:root {
    /* Light Mode Colors */
    --bg-primary: linear-gradient(135deg, #4CAF50 0%, #45a049 50%, #388E3C 100%);
    --bg-container: #ffffff;
    --bg-intro: #F1F8E9;
    --bg-input: #F1F8E9;
    --bg-input-focus: #ffffff;
    --bg-modal: #ffffff;
    --bg-modal-overlay: rgba(0, 0, 0, 0.7);
    --bg-tab: #ffffff;
    --bg-tab-hover: #F1F8E9;
    --bg-tab-active: #2E7D32;
    --bg-button: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    --bg-button-hover: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    --bg-result-data: #ffffff;
    --bg-logo: #ffffff;
    --bg-modal-close-hover: #F5F5F5;
    --bg-copy-button: #2196F3;
    --bg-copy-button-hover: #1976D2;
    --bg-copy-button-copied: #4CAF50;
    --bg-theme-toggle: rgba(255, 255, 255, 0.2);
    --bg-theme-toggle-hover: rgba(255, 255, 255, 0.3);

    --text-primary: #ffffff;
    --text-secondary: #2E7D32;
    --text-tertiary: #1B5E20;
    --text-label: #2E7D32;
    --text-modal-title: #2E7D32;
    --text-modal-close: #666;
    --text-modal-close-hover: #333;
    --text-data-label: #2E7D32;
    --text-data-value: #1B5E20;
    --text-error: #C62828;
    --text-tab: #2E7D32;
    --text-tab-active: #ffffff;
    --text-placeholder: rgba(27, 94, 32, 0.5);

    --border-primary: #4CAF50;
    --border-secondary: #2E7D32;
    --border-error: #F44336;
    --border-success: #4CAF50;
    --border-divider: #E0E0E0;
    --border-modal: #E0E0E0;

    --shadow-logo: 0 10px 30px rgba(0,0,0,0.2);
    --shadow-logo-hover: 0 15px 40px rgba(0,0,0,0.3);
    --shadow-container: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-button: 0 10px 30px rgba(76, 175, 80, 0.4);
    --shadow-button-hover: 0 15px 40px rgba(76, 175, 80, 0.5);
    --shadow-input-focus: 0 5px 15px rgba(76, 175, 80, 0.3);
    --shadow-step-number: 0 2px 8px rgba(76, 175, 80, 0.3);
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.5);

    --input-error-bg: #FFEBEE;
    --input-valid-bg: #E8F5E9;
    --result-success-bg: #E8F5E9;
    --result-error-bg: #FFEBEE;
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-primary: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #388E3C 100%);
    --bg-container: #1e1e1e;
    --bg-intro: #2d2d2d;
    --bg-input: #2d2d2d;
    --bg-input-focus: #3a3a3a;
    --bg-modal: #1e1e1e;
    --bg-modal-overlay: rgba(0, 0, 0, 0.85);
    --bg-tab: #2d2d2d;
    --bg-tab-hover: #3a3a3a;
    --bg-tab-active: #2E7D32;
    --bg-button: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    --bg-button-hover: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    --bg-result-data: #2d2d2d;
    --bg-logo: #2d2d2d;
    --bg-modal-close-hover: #3a3a3a;
    --bg-copy-button: #2196F3;
    --bg-copy-button-hover: #1976D2;
    --bg-copy-button-copied: #4CAF50;
    --bg-theme-toggle: rgba(255, 255, 255, 0.15);
    --bg-theme-toggle-hover: rgba(255, 255, 255, 0.25);

    --text-primary: #ffffff;
    --text-secondary: #81C784;
    --text-tertiary: #A5D6A7;
    --text-label: #81C784;
    --text-modal-title: #81C784;
    --text-modal-close: #b0b0b0;
    --text-modal-close-hover: #ffffff;
    --text-data-label: #81C784;
    --text-data-value: #A5D6A7;
    --text-error: #EF5350;
    --text-tab: #81C784;
    --text-tab-active: #ffffff;
    --text-placeholder: rgba(129, 199, 132, 0.7);

    --border-primary: #4CAF50;
    --border-secondary: #66BB6A;
    --border-error: #EF5350;
    --border-success: #4CAF50;
    --border-divider: #3a3a3a;
    --border-modal: #3a3a3a;

    --shadow-logo: 0 10px 30px rgba(0,0,0,0.5);
    --shadow-logo-hover: 0 15px 40px rgba(0,0,0,0.7);
    --shadow-container: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-button: 0 10px 30px rgba(76, 175, 80, 0.4);
    --shadow-button-hover: 0 15px 40px rgba(76, 175, 80, 0.5);
    --shadow-input-focus: 0 5px 15px rgba(76, 175, 80, 0.4);
    --shadow-step-number: 0 2px 8px rgba(76, 175, 80, 0.4);
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.8);

    --input-error-bg: #3d2727;
    --input-valid-bg: #2d3d2d;
    --result-success-bg: #2d3d2d;
    --result-error-bg: #3d2727;
}

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

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--border-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 1000;
    font-weight: 600;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid white;
    outline-offset: 2px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
}

body.body--top {
    align-items: flex-start;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 3px solid var(--border-primary);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid var(--border-primary);
    outline-offset: 2px;
}

.main-wrapper {
    max-width: 800px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.theme-toggle {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--bg-theme-toggle);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.theme-toggle:hover {
    background: var(--bg-theme-toggle-hover);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.theme-toggle svg {
    width: 28px;
    height: 28px;
    fill: var(--text-primary);
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(20deg);
}

@media (max-width: 768px) {
    .theme-toggle {
        width: 50px;
        height: 50px;
        top: -10px;
        right: -10px;
    }

    .theme-toggle svg {
        width: 24px;
        height: 24px;
    }
}

.logo-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: var(--bg-logo);
    border-radius: 50%;
    padding: 20px;
    box-shadow: var(--shadow-logo);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.logo-link:hover .logo {
    box-shadow: var(--shadow-logo-hover);
}

.logo-svg .logo-text {
    fill: var(--border-primary);
    transition: fill 0.3s ease;
}

.logo-svg .logo-checkmark {
    stroke: var(--border-primary);
    transition: stroke 0.3s ease;
}

.site-title {
    font-family: 'Bungee Inline', sans-serif;
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    line-height: 1.2;
    transition: color 0.3s ease;
}

.subtitle {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.header-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.25);
    opacity: 1;
}

/* Darker nav links in dark mode */
[data-theme="dark"] .nav-link {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Darker hover in dark mode */
[data-theme="dark"] .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    opacity: 0.85;
    border-color: rgba(255, 255, 255, 0.25);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--border-primary);
    border-color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    opacity: 1;
    text-shadow: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .header-nav {
        gap: 10px;
        margin-top: 6px;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 5px 12px;
    }
    
    .logo {
        width: 90px;
        height: 90px;
        margin: 0 auto 15px;
        padding: 15px;
    }
    
    .header {
        margin-bottom: 25px;
    }
}

.page-container h1,
.content h1 {
    font-family: 'Bungee Inline', sans-serif;
}

.footer {
    background: transparent;
    color: var(--text-primary);
    padding: 40px 20px 20px;
    margin-top: 50px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand {
    text-align: center;
}

.footer-brand .logo-link {
    display: block;
    margin: 0 auto 15px;
}

.footer-brand .logo {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    padding: 15px;
}

.footer-site-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 10px 0 5px;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.footer-tagline {
    font-size: 0.95rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-column {
    text-align: left;
}

.footer-column-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 8px;
}

.footer-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-link-list li {
    margin-bottom: 10px;
}

.footer-link-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    opacity: 0.9;
}

.footer-link-list a:hover {
    opacity: 1;
    transform: translateX(5px);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.footer-link-list a.active {
    opacity: 1;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 15px rgba(255, 255, 255, 0.5);
    position: relative;
}

.footer-link-list a.active::before {
    content: '▶';
    margin-right: 6px;
    font-size: 0.8rem;
    display: inline-block;
}

[data-theme="dark"] .footer-link-list a.active {
    color: #A5D6A7;
    text-shadow: 0 0 10px rgba(165, 214, 167, 0.8), 0 0 15px rgba(165, 214, 167, 0.5);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 20px;
}

.footer-bottom p {
    margin: 8px 0;
    font-size: 0.9rem;
    opacity: 0.85;
}

.footer-powered-by {
    font-size: 0.85rem !important;
    opacity: 0.7 !important;
}

.footer-copyright {
    font-size: 0.8rem !important;
    opacity: 0.6 !important;
    margin-top: 10px !important;
}

.presence-counter {
    margin-top: 15px;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.presence-counter #user-count {
    margin-right: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: inline-block;
    min-width: 30px;
    text-align: center;
}

@media (max-width: 1024px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer-brand .logo {
        width: 90px;
        height: 90px;
        padding: 15px;
    }
    
    .footer-column {
        text-align: left;
    }
    
    .presence-counter {
        font-size: 0.85rem;
        margin-top: 12px;
    }
    
    .presence-counter #user-count {
        font-size: 1rem;
    }
    
    .footer {
        padding: 30px 15px 15px;
    }
    
    .footer-site-name {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-column-title {
        font-size: 1rem;
    }
    
    .footer-link-list a {
        font-size: 0.9rem;
    }
}

.live-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
}

.live-indicator.active {
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 12px rgba(255, 255, 255, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

[data-theme="dark"] .live-indicator.active {
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 12px rgba(255, 255, 255, 0.6);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin-bottom: 20px;
    padding: 0 20px;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #1B5E20;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
    color: #2E7D32;
}

.breadcrumb-item span {
    color: #1B5E20;
    font-weight: 600;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #1B5E20;
    opacity: 0.7;
}

[data-theme="dark"] .breadcrumb-item a {
    color: #81C784;
}

[data-theme="dark"] .breadcrumb-item a:hover {
    color: #A5D6A7;
}

[data-theme="dark"] .breadcrumb-item span {
    color: #A5D6A7;
}

[data-theme="dark"] .breadcrumb-separator {
    color: #81C784;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .breadcrumb-nav {
        padding: 0 10px;
        margin-bottom: 15px;
    }
    
    .breadcrumb-list {
        font-size: 0.85rem;
    }
    
    .breadcrumb-separator {
        margin: 0 6px;
    }
}

/* Go to Top Button */
.go-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--bg-button);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-button);
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.go-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.go-to-top:hover {
    background: var(--bg-button-hover);
    box-shadow: var(--shadow-button-hover);
    transform: translateY(-3px);
}

.go-to-top:active {
    transform: translateY(0);
}

.go-to-top svg {
    width: 24px;
    height: 24px;
}

[data-theme="dark"] .go-to-top {
    background: var(--bg-button);
    box-shadow: var(--shadow-button);
}

[data-theme="dark"] .go-to-top:hover {
    background: var(--bg-button-hover);
    box-shadow: var(--shadow-button-hover);
}

@media (max-width: 768px) {
    .go-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .go-to-top svg {
        width: 20px;
        height: 20px;
    }
}
