:root {
    --background: 246 13% 30%;
    --foreground: 0 0% 98%;
    --card: 246 13% 25%;
    --card-foreground: 0 0% 98%;
    --popover: 246 13% 30%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 246 13% 30%;
    --secondary: 246 13% 20%;
    --secondary-foreground: 0 0% 98%;
    --muted: 246 13% 20%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 342 82% 73%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 246 13% 40%;
    --input: 246 13% 20%;
    --ring: 342 82% 73%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    overflow: hidden;
}

a {
    color: hsl(var(--accent));
}

.announcement-banner {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    padding: 12px 48px 12px 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease, transform 0.3s ease;
    font-size: 14px;
}

.announcement-banner a {
    color: hsl(var(--card));
    text-decoration: underline;
}

.announcement-banner a:hover {
    opacity: 0.8;
}

.announcement-banner.hidden {
    transform: translateY(-100%);
}

.sidebar.collapsed ~ .announcement-banner {
    left: 60px;
}

.announcement-content {
    text-align: center;
}

.announcement-content p {
    display: inline;
    margin: 0;
}

.announcement-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: hsl(var(--accent-foreground));
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-family: 'JetBrains Mono', monospace;
}

.announcement-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: hsl(var(--card));
    border-right: 2px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 999;
}

.sidebar.collapsed {
    transform: translateX(-220px);
}

.sidebar.collapsed ~ .main-content {
    left: 60px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid hsl(var(--border));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 20px;
    color: hsl(var(--accent));
    font-weight: 700;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: hsl(var(--foreground));
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: background 0.2s;
    font-family: 'JetBrains Mono', monospace;
}

.sidebar-toggle:hover {
    background: hsl(var(--muted));
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.nav-section {
    margin-bottom: 24px;
    padding: 0 20px;
}

.nav-section h3 {
    font-size: 11px;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-section a {
    display: block;
    padding: 10px 12px;
    color: hsl(var(--foreground));
    text-decoration: none;
    margin-bottom: 4px;
    transition: background 0.2s, color 0.2s;
    font-size: 14px;
}

.nav-section a:hover,
.nav-section a.active {
    background: hsl(var(--accent) / 0.2);
    color: hsl(var(--accent));
}

.nav-bottom {
    margin-top: auto;
    border-top: 2px solid hsl(var(--border));
    padding-top: 20px;
}

.preferences-btn {
    width: 100%;
    padding: 10px 12px;
    background: hsl(var(--secondary));
    border: 2px solid hsl(var(--border));
    color: hsl(var(--foreground));
    cursor: pointer;
    font-size: 14px;
    margin-top: 8px;
    transition: background 0.2s, color 0.2s;
    font-family: 'JetBrains Mono', monospace;
    text-align: left;
    text-decoration: none;
    display: block;
}

.preferences-btn:hover {
    background: hsl(var(--accent) / 0.2);
    color: hsl(var(--accent));
}

.main-content {
    position: fixed;
    left: 280px;
    top: 44px;
    right: 0;
    bottom: 0;
    transition: left 0.3s ease, top 0.3s ease;
}

.main-content.no-banner {
    top: 0;
}

.page-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
}

.page-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../assets/background.png');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

#content-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    z-index: 1;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: hsl(var(--card));
    border: 2px solid hsl(var(--border));
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid hsl(var(--border));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: hsl(var(--foreground));
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-family: 'JetBrains Mono', monospace;
}

.modal-close:hover {
    background: hsl(var(--muted));
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.preference-section {
    margin-bottom: 20px;
}

.preference-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

.preference-section select {
    width: 100%;
    padding: 10px;
    background: hsl(var(--input));
    border: 2px solid hsl(var(--border));
    color: hsl(var(--foreground));
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
}

.customize-btn {
    width: 100%;
    padding: 12px;
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    transition: opacity 0.2s;
    font-family: 'JetBrains Mono', monospace;
}

.customize-btn:hover {
    opacity: 0.9;
}

#custom-theme-editor h3 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.color-mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.color-mode-toggle button {
    flex: 1;
    padding: 8px;
    background: hsl(var(--secondary));
    border: 2px solid hsl(var(--border));
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'JetBrains Mono', monospace;
}

.color-mode-toggle button.active {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    border-color: hsl(var(--accent));
}

.theme-colors {
    display: grid;
    gap: 12px;
}

.color-input {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-input label {
    flex: 1;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-input input {
    width: 150px;
    padding: 8px;
    background: hsl(var(--input));
    border: 2px solid hsl(var(--border));
    color: hsl(var(--foreground));
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        left: 0;
    }
    
    .announcement-banner {
        left: 0;
    }
}

.hide-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}