:root {
    --color-background: #0e1117;
    --color-foreground: #e2e8f0;
    --color-surface: #11141c;
    --color-surface-dark: #1b1f2a;
    --color-primary: #4fffb0;
    --color-primary-hover: #38f5a0;
    --color-secondary: #94a3b8;
    --color-secondary-alt: #2c3243;
    --color-secondary-alt-hover: #394150;
    --box-background: var(--color-surface);
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --box-shadow-accent: 0 0 12px rgba(79, 255, 176, 0.27);
}

:root.light-theme {
    --color-background: #f8fafc;
    --color-foreground: #0e1117;
    --color-surface: #ffffff;
    --color-surface-dark: #e2e8f0;
    --color-primary: #4fffb0;
    --color-primary-hover: #38f5a0;
    --color-secondary: #64748b;
    --color-secondary-alt: #cbd5e1;
    --color-secondary-alt-hover: #94a3b8;
    --box-background: var(--color-surface);
    --box-shadow: 0 4px 20px rgba(255, 255, 255, 0.4);
    --box-shadow-accent: 0 0 12px rgba(49, 74, 65, 0.27);
}

html, body {
    transition:
            background-color 0.4s ease,
            color 0.4s ease,
            box-shadow 0.4s ease,
            border-color 0.4s ease;
}
/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Layout */
main {
    flex: 1;
    margin: 2rem;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--color-background);
    color: var(--color-foreground);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--color-surface);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
    display: flex;
    flex-direction: row;
}

.myicon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 0.5rem;
}

.nav a {
    margin: 0 1rem;
    text-decoration: none;
    color: var(--color-secondary);
}

.user-status {
    display: flex;
    align-items: center;
}

.username {
    margin-right: 0.5rem;
    padding-right: 0.5rem;
    color: var(--color-primary);
}

#connectBtn {
    padding: 0.4rem 0.8rem;
    background: var(--color-primary);
    color: var(--color-background);
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--color-surface);
    font-size: 0.875rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--color-surface-dark);
    color: var(--color-foreground);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    font-size: 0.95rem;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    background-color: var(--color-primary);
    color: var(--color-background);
    transition: background 0.3s;
}

.cookie-btn.secondary {
    background-color: var(--color-secondary-alt);
    color: var(--color-foreground);
}

.cookie-btn:hover {
    background-color: var(--color-primary-hover);
}

.cookie-btn.secondary:hover {
    background-color: var(--color-secondary-alt-hover);
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 300px;
    background: var(--color-surface-dark);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.6);
    padding: 2rem 1rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.settings-panel.active {
    transform: translateX(0);
}

.settings-panel h2,
.settings-panel h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.settings-panel section {
    margin-bottom: 2rem;
}

.settings-panel button {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    background: var(--color-primary);
    color: var(--color-background);
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.settings-panel button:hover {
    background: var(--color-primary-hover);
}

.settings-actions {
    display: flex;
    gap: 1rem;
}

.open-settings {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    padding: 0.75rem;
    background: transparent;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.3s;
}

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    main {
        margin: 2rem 0 0;
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav {
        margin-top: 1rem;
    }
    .nav a {
        margin: 0 0.5rem;
    }
    .user-status {
        margin-top: 1rem;
    }
}
