/* Theme variables */
:root {
    --bg-color: #f8f9fa;
    --text-color: #333;
    --header-bg: #fff;
    --main-bg: #fff;
    --footer-bg: #2c3e50;
    --footer-text: #ecf0f1;
    --nav-link: #666;
    --nav-link-hover-bg: #e9ecef;
    --nav-link-hover-text: #2c3e50;
    --heading-color: #2c3e50;
    --shadow: rgba(0, 0, 0, 0.1);
    --border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e5e5e5;
    --header-bg: #2d2d2d;
    --main-bg: #2d2d2d;
    --footer-bg: #1a1a1a;
    --footer-text: #e5e5e5;
    --nav-link: #b0b0b0;
    --nav-link-hover-bg: #3a3a3a;
    --nav-link-hover-text: #ffffff;
    --heading-color: #ffffff;
    --shadow: rgba(0, 0, 0, 0.3);
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header and navigation */
header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 4px var(--shadow);
    padding: 1rem 0;
    transition: background-color 0.3s ease;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

nav h1 a {
    color: var(--heading-color);
    text-decoration: none;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

nav ul li a {
    color: var(--nav-link);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--nav-link-hover-bg);
    color: var(--nav-link-hover-text);
}

/* Theme toggle button */
#theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    color: var(--text-color);
}

#theme-toggle:hover {
    background-color: var(--nav-link-hover-bg);
    transform: scale(1.1);
}

#theme-toggle:focus {
    outline: 2px solid var(--heading-color);
    outline-offset: 2px;
}

/* Main content */
main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 2rem;
    background-color: var(--main-bg);
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    transition: background-color 0.3s ease;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    color: var(--heading-color);
    transition: color 0.3s ease;
}

p {
    margin-bottom: 1rem;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 0.75rem 0; /* reduced height of the bottom bar */
    width: 100%;
    margin-top: auto;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.uptime-monitor {
    margin-top: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        justify-content: center;
        gap: 1rem;
    }
    
    main {
        margin: 1rem auto;
    }
    
    .content {
        padding: 1rem;
    }
    
    #theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}
