* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    scroll-behavior: smooth;
    background-color: var(--frame-bg-color);
}

:root {
    --bg-color: #ffffff;
    --text-color: #24292e;
    --accent-color: #4e54c8;
    --frame-bg-color: #f6f8fa;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0d1117;
        --text-color: #c9d1d9;
        --accent-color: #4e50c8;
        --frame-bg-color: #161b22;
    }
}

a {
    color: var(--text-color);
    text-decoration: none;
}

/* Navigation */
.topnav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
}

.topnav .left-link img {
    height: 40px;
    width: 40px;
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-color);
}

.menu-toggle {
    display: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links .right-link {
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.2s ease;
}

.nav-links .right-link:hover {
    border-bottom: 2px solid var(--accent-color);
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    .nav-links {
        width: 100%;
        flex-direction: column;
        display: none;
    }
    .menu-toggle:checked + .hamburger + .nav-links {
        display: flex;
        margin-top: 0.5rem;
    }
    .nav-links .right-link {
        padding: 0.5rem 0;
    }
}

/* Hero */
.hero {
    text-align: center;
    padding: 6rem 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Dashboard */
.dashboard-frame {
    padding: 4rem 1rem;
    display: flex;
    justify-content: center;
    background-color: var(--frame-bg-color);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 900px;
}

.dashboard-card {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dashboard-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.dashboard-card p {
    font-size: 0.95rem;
    opacity: 0.85;
}

.logout-card {
    border: 2px solid #ff5656;
    color: #ff5656;
}

.logout {
    color: #ff5656;
}

.logout-link {
    color: #ff5656;
}

/* Notice */
.notice-frame {
    padding: 3rem 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
}

.notice-text {
    max-width: 700px;
    margin: 0 auto;
}

.notice-text h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.notice-text p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.85;
}

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}



.modal-content {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 20px;
    border-radius: 12px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.modal-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: space-around;
}

.modal-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.cancel-btn {
    background: #ccc;
    color: #000;
}

.logout-btn {
    background: #ff5656;
    color: #fff;
}

.logout-btn:hover {
    background: darkred;
}












#font-toggle {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: background 0.3s ease, transform 0.2s ease;
}

#font-toggle:hover,
#font-toggle:focus {
    background: #3b3db0;
    outline: none;
    transform: scale(1.05);
}

#font-toggle:active {
    transform: scale(0.95);
}

@media (max-width: 480px) {
    #font-toggle {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.4rem;
    }
}

body.dyslexic {
    font-family: "OpenDyslexic", Arial, sans-serif;
}