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

/* CSS Variables for Theme Colors */
:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #1e1e1e;
    --bg-card: rgba(30, 30, 46, 0.95);
    --bg-card-secondary: rgba(45, 45, 60, 0.6);
    
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-tertiary: #888;
    --text-quaternary: #666;
    
    --accent-blue: #4a9eff;
    --accent-purple: #7b68ee;
    --accent-indigo: #667eea;
    
    --border-color: rgba(74, 158, 255, 0.2);
    --border-color-hover: rgba(74, 158, 255, 0.4);
    
    --shadow-sm: rgba(0, 0, 0, 0.2);
    --shadow-md: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.6);
    
    --overlay-dark: rgba(0, 0, 0, 0.8);
}

/* Light Theme Variables */
body[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #e8ecf2;
    --bg-tertiary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-secondary: rgba(240, 242, 247, 0.9);
    
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-tertiary: #718096;
    --text-quaternary: #a0aec0;
    
    --accent-blue: #3182ce;
    --accent-purple: #6b46c1;
    --accent-indigo: #5a67d8;
    
    --border-color: rgba(49, 130, 206, 0.2);
    --border-color-hover: rgba(49, 130, 206, 0.4);
    
    --shadow-sm: rgba(0, 0, 0, 0.05);
    --shadow-md: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    
    --overlay-dark: rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-secondary) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px var(--shadow-lg), 0 0 20px rgba(74, 158, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), var(--accent-purple), var(--accent-indigo), transparent);
    opacity: 0.6;
}

.navbar:hover {
    box-shadow: 0 6px 40px var(--shadow-lg), 0 0 30px rgba(74, 158, 255, 0.15);
}

/* Light theme navbar adjustments */
body[data-theme="light"] .navbar {
    box-shadow: 0 2px 15px var(--shadow-md), 0 0 0 1px var(--border-color);
}

body[data-theme="light"] .navbar:hover {
    box-shadow: 0 4px 20px var(--shadow-md), 0 0 0 1px var(--border-color-hover);
}

/* Light Theme - Mobile Menu */
@media (max-width: 768px) {
    body[data-theme="light"] .nav-links {
        background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
        border-top: 1px solid #cbd5e0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    body[data-theme="light"] .nav-links a,
    body[data-theme="light"] .nav-links button,
    body[data-theme="light"] .nav-links span {
        color: #2d3748;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    body[data-theme="light"] .nav-links a:hover,
    body[data-theme="light"] .nav-links button:hover {
        background: linear-gradient(135deg, rgba(49, 130, 206, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
        color: #3182ce;
    }
    
    body[data-theme="light"] .mobile-menu-toggle .hamburger-line {
        background: #2d3748;
    }
    
    body[data-theme="light"] .profile-dropdown-menu {
        background: #ffffff;
        border: 1px solid #cbd5e0;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }
    
    body[data-theme="light"] .profile-dropdown-menu a {
        color: #2d3748;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    body[data-theme="light"] .profile-dropdown-menu a:hover {
        background: #edf2f7;
        color: #3182ce;
    }
    
    body[data-theme="light"] .profile-info {
        color: #4a5568;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    body[data-theme="light"] .profile-username {
        color: #1a202c;
    }
    
    body[data-theme="light"] .profile-email {
        color: #718096;
    }
}

.logo {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 50%, var(--accent-indigo) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
    position: relative;
    filter: drop-shadow(0 0 10px rgba(74, 158, 255, 0.3));
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(74, 158, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(74, 158, 255, 0.5));
    }
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #4a9eff, #7b68ee, #667eea);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.6);
}

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

.logo:hover::after {
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: linear-gradient(135deg, #4a9eff 0%, #7b68ee 50%, #667eea 100%);
    border-radius: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.4);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-links a, .nav-links button {
    color: var(--text-primary);
    text-decoration: none;
    padding: 11px 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 15px;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-links a:hover::before {
    left: 100%;
}

.nav-links a:hover {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.15) 0%, rgba(123, 104, 238, 0.15) 100%);
    color: var(--accent-blue);
    transform: translateY(-3px);
    border-color: var(--border-color-hover);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.2);
}

.nav-links a[style*="color: #2ed573"]:hover {
    background: rgba(46, 213, 115, 0.1) !important;
    color: #2ed573 !important;
    box-shadow: 0 0 15px rgba(46, 213, 115, 0.2);
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.12) 0%, rgba(123, 104, 238, 0.12) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.1);
}

.profile-btn svg {
    transition: all 0.3s ease;
}

.profile-btn:hover {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.18) 0%, rgba(123, 104, 238, 0.18) 100%);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.2);
}

.profile-username {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.profile-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 280px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-secondary) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 40px var(--shadow-lg), 0 0 20px rgba(74, 158, 255, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    overflow: hidden;
}

.profile-dropdown.active .profile-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.08) 0%, rgba(123, 104, 238, 0.08) 100%);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.2) 0%, rgba(123, 104, 238, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(74, 158, 255, 0.4);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.2);
}

.profile-avatar svg {
    color: var(--accent-blue);
}

.profile-details {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-email {
    font-size: 13px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.3), transparent);
    margin: 8px 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text-primary);
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.profile-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, var(--accent-blue), transparent);
    transition: width 0.3s ease;
}

.profile-menu-item:hover {
    background: linear-gradient(90deg, rgba(74, 158, 255, 0.12), transparent);
    color: var(--accent-blue);
    padding-left: 24px;
}

.profile-menu-item:hover::before {
    width: 4px;
}

.profile-menu-item svg {
    transition: all 0.3s ease;
}

.profile-menu-item:hover svg {
    transform: translateX(2px);
}

.logout-btn {
    color: #ff4757;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 71, 87, 0.1);
}

.logout-btn::before {
    background: linear-gradient(90deg, #ff4757, transparent);
}

.logout-btn:hover {
    background: linear-gradient(90deg, rgba(255, 71, 87, 0.12), transparent);
    color: #ff6b81;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    color: var(--text-primary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.theme-toggle-btn::before {
    background: linear-gradient(90deg, var(--accent-blue), transparent);
}

.theme-toggle-btn:hover {
    background: linear-gradient(90deg, rgba(74, 158, 255, 0.12), transparent);
    color: var(--accent-blue);
}

.theme-icon {
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover .theme-icon {
    transform: translateX(2px) rotate(15deg);
}

/* Light theme specific adjustments */
body[data-theme="light"] .theme-toggle-btn:hover .theme-icon-dark {
    transform: translateX(2px) rotate(-15deg);
}

/* ========================================
   LIGHT THEME GLOBAL ADJUSTMENTS
   ======================================== */

/* Containers and Cards */
body[data-theme="light"] .container {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

body[data-theme="light"] .stat-card,
body[data-theme="light"] .question-card,
body[data-theme="light"] .challenge-card {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-sm);
}

/* Editor Page - Light Theme */
body[data-theme="light"] .editor-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf2 50%, #f5f7fa 100%);
}

body[data-theme="light"] .editor-panel {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
}

body[data-theme="light"] .panel-header {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

body[data-theme="light"] #code-editor {
    background-color: #ffffff;
}

body[data-theme="light"] #input-area,
body[data-theme="light"] #output-area {
    background-color: #ffffff;
    color: #1a202c;
    border: 1px solid #e2e8f0;
}

body[data-theme="light"] #output-area {
    color: #1a202c !important;
}

body[data-theme="light"] .toolbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 250, 252, 0.95) 100%);
    border-bottom: 1px solid #cbd5e0;
    backdrop-filter: blur(10px);
}

body[data-theme="light"] .language-selector,
body[data-theme="light"] select {
    background-color: #ffffff;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}

body[data-theme="light"] .language-selector:hover,
body[data-theme="light"] select:hover {
    border-color: #3182ce;
    background-color: #f7fafc;
}

body[data-theme="light"] #input-area::-webkit-scrollbar-track,
body[data-theme="light"] #output-area::-webkit-scrollbar-track {
    background: #f1f5f9;
}

body[data-theme="light"] #input-area::-webkit-scrollbar-thumb {
    background: #94a3b8;
}

body[data-theme="light"] #input-area::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

body[data-theme="light"] #output-area::-webkit-scrollbar-thumb {
    background: #3182ce;
}

body[data-theme="light"] #output-area::-webkit-scrollbar-thumb:hover {
    background: #2c5aa0;
}

/* File Explorer - Light Theme */
body[data-theme="light"] .file-explorer {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
}

body[data-theme="light"] .explorer-header {
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

body[data-theme="light"] .explorer-header h3 {
    color: #2d3748;
}

body[data-theme="light"] .icon-btn {
    border-color: #cbd5e0;
    color: #3182ce;
    background: transparent;
}

body[data-theme="light"] .icon-btn:hover {
    background: #edf2f7;
    border-color: #3182ce;
}

body[data-theme="light"] .file-tree {
    background: #ffffff;
}

body[data-theme="light"] .file-tree::-webkit-scrollbar-track {
    background: #f7fafc;
}

body[data-theme="light"] .file-tree::-webkit-scrollbar-thumb {
    background: #cbd5e0;
}

body[data-theme="light"] .file-tree::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

body[data-theme="light"] .file-item,
body[data-theme="light"] .folder-item {
    color: #2d3748;
}

body[data-theme="light"] .file-item:hover,
body[data-theme="light"] .folder-item:hover {
    background: #edf2f7;
}

body[data-theme="light"] .file-item.active {
    background: #bee3f8;
    color: #2c5aa0;
    font-weight: 600;
}

body[data-theme="light"] .folder-item {
    color: #1a202c;
}

body[data-theme="light"] .loading {
    color: #718096;
}

body[data-theme="light"] .context-menu {
    background: #ffffff;
    border: 1px solid #cbd5e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body[data-theme="light"] .context-menu-item {
    color: #2d3748;
}

body[data-theme="light"] .context-menu-item:hover {
    background: #edf2f7;
}

body[data-theme="light"] .context-menu-separator {
    background: #e2e8f0;
}

body[data-theme="light"] .context-menu-danger {
    color: #e53e3e;
}

body[data-theme="light"] .context-menu-danger:hover {
    background: #fed7d7;
    color: #c53030;
}

body[data-theme="light"] .inline-input {
    background: #ffffff;
    border-color: #3182ce;
    color: #2d3748;
}

body[data-theme="light"] .inline-input:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 1px #3182ce;
}

body[data-theme="light"] .floating-modal-content {
    background: #ffffff;
    border: 1px solid #cbd5e0;
}

body[data-theme="light"] .floating-modal-header {
    border-bottom: 1px solid #e2e8f0;
}

body[data-theme="light"] .floating-modal-header h3 {
    color: #2d3748;
}

body[data-theme="light"] .modal-close-btn {
    color: #718096;
}

body[data-theme="light"] .modal-close-btn:hover {
    color: #2d3748;
}

body[data-theme="light"] .floating-modal-body p {
    color: #4a5568;
}

body[data-theme="light"] .modal-input {
    background: #ffffff;
    border-color: #cbd5e0;
    color: #2d3748;
}

body[data-theme="light"] .modal-input:focus {
    border-color: #3182ce;
}

body[data-theme="light"] .modal-btn-primary {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    color: #ffffff;
}

body[data-theme="light"] .modal-btn-primary:hover {
    background: linear-gradient(135deg, #2c5aa0 0%, #2b6cb0 100%);
}

body[data-theme="light"] .modal-btn-secondary {
    background: #edf2f7;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}

body[data-theme="light"] .modal-btn-secondary:hover {
    background: #e2e8f0;
}

/* Buttons */
body[data-theme="light"] .btn-primary {
    box-shadow: 0 2px 10px rgba(49, 130, 206, 0.3);
}

body[data-theme="light"] .btn-tool {
    background: var(--bg-card-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body[data-theme="light"] .btn-tool:hover {
    background: linear-gradient(135deg, rgba(49, 130, 206, 0.1) 0%, rgba(90, 103, 216, 0.1) 100%);
    border-color: var(--border-color-hover);
}

/* Inputs and Forms */
body[data-theme="light"] input,
body[data-theme="light"] textarea,
body[data-theme="light"] select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body[data-theme="light"] input:focus,
body[data-theme="light"] textarea:focus,
body[data-theme="light"] select:focus {
    border-color: var(--border-color-hover);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

/* Tables and Lists */
body[data-theme="light"] .table-header,
body[data-theme="light"] .problems-list,
body[data-theme="light"] .leaderboard-container {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

body[data-theme="light"] .problem-row,
body[data-theme="light"] .leaderboard-row {
    border-color: var(--border-color);
}

body[data-theme="light"] .problem-row:hover,
body[data-theme="light"] .leaderboard-row:hover {
    background: rgba(49, 130, 206, 0.05);
}

body[data-theme="light"] .problem-title {
    color: #1a202c;
    font-weight: 700;
}

body[data-theme="light"] .problem-row:hover .problem-title {
    color: #2c5aa0;
}

body[data-theme="light"] .problem-description {
    color: #2d3748;
}

body[data-theme="light"] .problem-id {
    color: #2c5aa0;
    font-weight: 700;
}

body[data-theme="light"] .problem-tags,
body[data-theme="light"] .problem-tag {
    color: #2c5aa0;
}

/* Filters Section - Light Theme */
body[data-theme="light"] .filters-section {
    background: transparent;
}

body[data-theme="light"] .search-input {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(203, 213, 224, 0.8);
    color: #2d3748;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .search-input:focus {
    border-color: rgba(49, 130, 206, 0.6);
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.1), 0 4px 16px rgba(49, 130, 206, 0.15);
}

body[data-theme="light"] .search-input::placeholder {
    color: #a0aec0;
}

body[data-theme="light"] .filter-select {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(203, 213, 224, 0.8);
    color: #2d3748;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .filter-select:hover {
    border-color: rgba(49, 130, 206, 0.4);
    box-shadow: 0 4px 16px rgba(49, 130, 206, 0.1);
}

body[data-theme="light"] .filter-select:focus {
    border-color: rgba(49, 130, 206, 0.6);
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.1);
}

body[data-theme="light"] .filter-select option {
    background: #ffffff;
    color: #2d3748;
}

body[data-theme="light"] .result-count {
    color: #718096;
    background: rgba(49, 130, 206, 0.08);
    border: 1px solid rgba(49, 130, 206, 0.2);
}

/* Problem View/Solve Page - Light Theme */
body[data-theme="light"] .problem-view-container {
    background-color: #f5f7fa;
    color: #2d3748;
}

body[data-theme="light"] .problem-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

body[data-theme="light"] .back-btn {
    background-color: #edf2f7;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}

body[data-theme="light"] .back-btn:hover {
    background-color: #e2e8f0;
    border-color: #3182ce;
}

body[data-theme="light"] .problem-main-content {
    background-color: #e2e8f0;
}

body[data-theme="light"] .problem-left-panel {
    background-color: #ffffff;
}

body[data-theme="light"] .problem-tabs {
    border-bottom: 1px solid #e2e8f0;
    background-color: #f7fafc;
}

body[data-theme="light"] .problem-tab {
    color: #718096;
}

body[data-theme="light"] .problem-tab.active {
    color: #3182ce;
    background-color: #ffffff;
    border-bottom: 2px solid #3182ce;
}

body[data-theme="light"] .problem-tab:hover:not(.active) {
    color: #2d3748;
    background-color: #edf2f7;
}

body[data-theme="light"] .problem-description {
    color: #2d3748;
}

body[data-theme="light"] .section-title {
    color: #3182ce;
}

body[data-theme="light"] .problem-right-panel {
    background-color: #ffffff;
}

body[data-theme="light"] .editor-header {
    background-color: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

body[data-theme="light"] .editor-select,
body[data-theme="light"] .language-select {
    background-color: #ffffff;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}

body[data-theme="light"] .run-btn,
body[data-theme="light"] .submit-btn {
    border: 1px solid transparent;
}

body[data-theme="light"] .input-section {
    background-color: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

body[data-theme="light"] .input-header {
    background-color: #f7fafc;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}

body[data-theme="light"] .input-textarea {
    background-color: #ffffff;
    color: #1a202c;
    border: 1px solid #e2e8f0;
}

body[data-theme="light"] .input-textarea::-webkit-scrollbar-track {
    background: #f1f5f9;
}

body[data-theme="light"] .input-textarea::-webkit-scrollbar-thumb {
    background: #cbd5e0;
}

body[data-theme="light"] .input-textarea::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

body[data-theme="light"] .output-text {
    background-color: #f7fafc;
    color: #1a202c;
    border: 1px solid #e2e8f0;
}

body[data-theme="light"] .test-results-content {
    color: #2d3748;
}

body[data-theme="light"] .test-case {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
}

body[data-theme="light"] .test-case.passed {
    background-color: rgba(16, 185, 129, 0.05);
    border-color: #10b981;
}

body[data-theme="light"] .test-case.failed {
    background-color: rgba(239, 68, 68, 0.05);
    border-color: #ef4444;
}

body[data-theme="light"] .test-case-header {
    color: #2d3748;
}

body[data-theme="light"] .test-case-details {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
}

body[data-theme="light"] .test-case-label {
    color: #718096;
}

body[data-theme="light"] .test-case-value {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    color: #1a202c;
}

body[data-theme="light"] .output-header {
    color: #2d3748;
}

body[data-theme="light"] .running-indicator {
    color: #3182ce;
}

body[data-theme="light"] .hint-item {
    background-color: #f7fafc;
    border-left: 3px solid #3182ce;
}

body[data-theme="light"] .hint-button {
    background-color: #edf2f7;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}

body[data-theme="light"] .hint-button:hover {
    background-color: #e2e8f0;
}

body[data-theme="light"] .hint-content {
    background-color: #f7fafc;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}

body[data-theme="light"] .example-box {
    background-color: #f7fafc;
    border: 1px solid #cbd5e0;
}

body[data-theme="light"] .example-label {
    color: #3182ce;
    border-bottom: 1px solid #cbd5e0;
}

body[data-theme="light"] .example-content {
    background-color: #ffffff;
    color: #1a202c;
}

body[data-theme="light"] .example-content pre,
body[data-theme="light"] .example-content code {
    background-color: #edf2f7;
    color: #1a202c;
}

body[data-theme="light"] .problem-description pre,
body[data-theme="light"] .problem-description code {
    background-color: #edf2f7;
    color: #1a202c;
    border: 1px solid #cbd5e0;
}

body[data-theme="light"] .problem-description strong {
    color: #1a202c;
}

body[data-theme="light"] .problem-section {
    color: #2d3748;
}

body[data-theme="light"] .constraints-list {
    color: #4a5568;
}

body[data-theme="light"] .constraints-list li {
    color: #4a5568;
}

/* Code Editor */
body[data-theme="light"] .CodeMirror {
    background: #ffffff !important;
    color: #2d3748 !important;
}

body[data-theme="light"] .CodeMirror-gutters {
    background: #f7fafc !important;
    border-color: var(--border-color) !important;
}

body[data-theme="light"] .CodeMirror-linenumber {
    color: var(--text-tertiary) !important;
}

/* Titles and Headings */
body[data-theme="light"] h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3,
body[data-theme="light"] h4,
body[data-theme="light"] h5,
body[data-theme="light"] h6 {
    color: var(--text-primary);
}

/* Gradient Text Elements */
body[data-theme="light"] .gradient-text {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Difficulty Badges */
body[data-theme="light"] .difficulty-badge.easy {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
    border-color: rgba(72, 187, 120, 0.3);
}

body[data-theme="light"] .difficulty-badge.medium {
    background: rgba(237, 137, 54, 0.1);
    color: #c05621;
    border-color: rgba(237, 137, 54, 0.3);
}

body[data-theme="light"] .difficulty-badge.hard {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
    border-color: rgba(245, 101, 101, 0.3);
}

/* Tooltips and Dropdowns */
body[data-theme="light"] .tooltip,
body[data-theme="light"] .dropdown-menu {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-md);
}

/* Scrollbars (Webkit) */
body[data-theme="light"] ::-webkit-scrollbar {
    background: var(--bg-secondary);
}

body[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: var(--text-quaternary);
    border-color: var(--bg-secondary);
}

body[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Modals and Overlays */
body[data-theme="light"] .modal {
    background-color: rgba(0, 0, 0, 0.4);
}

body[data-theme="light"] .modal-overlay {
    background: var(--overlay-dark);
}

body[data-theme="light"] .modal-content {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    box-shadow: 0 10px 40px var(--shadow-lg);
}

body[data-theme="light"] .modal-header {
    border-bottom-color: var(--border-color);
}

body[data-theme="light"] .modal-header h2 {
    color: var(--accent-blue);
}

body[data-theme="light"] .modal-body {
    color: var(--text-primary);
}

body[data-theme="light"] .modal-footer {
    border-top-color: var(--border-color);
}

/* Pagination */
body[data-theme="light"] .pagination-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body[data-theme="light"] .pagination-btn:hover:not(:disabled) {
    background: var(--accent-blue);
    color: white;
}

body[data-theme="light"] .pagination-btn.active {
    background: var(--accent-blue);
    color: white;
}

/* Tabs */
body[data-theme="light"] .arena-tab,
body[data-theme="light"] .tab-btn {
    color: var(--text-primary);
    border-color: var(--border-color);
}

body[data-theme="light"] .arena-tab.active,
body[data-theme="light"] .tab-btn.active {
    background: rgba(49, 130, 206, 0.1);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Stats and Metrics */
body[data-theme="light"] .stat-number,
body[data-theme="light"] .stat-value {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="light"] .stat-label {
    color: var(--text-tertiary);
}

/* Tags */
body[data-theme="light"] .problem-tags,
body[data-theme="light"] .tag {
    background: rgba(49, 130, 206, 0.1);
    color: var(--accent-blue);
    border-color: rgba(49, 130, 206, 0.2);
}

/* Loading States */
body[data-theme="light"] .loading,
body[data-theme="light"] .skeleton {
    background: linear-gradient(90deg, var(--bg-secondary), var(--bg-tertiary), var(--bg-secondary));
}

/* Empty States */
body[data-theme="light"] .empty-state,
body[data-theme="light"] .no-data {
    color: var(--text-tertiary);
}

/* Success/Error States */
body[data-theme="light"] .success {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
    border-color: rgba(72, 187, 120, 0.3);
}

body[data-theme="light"] .error {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
    border-color: rgba(245, 101, 101, 0.3);
}

/* ========================================
   FOOTER STYLES
   ======================================== */

.site-footer {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(45, 45, 45, 0.95) 100%);
    padding: 40px 20px;
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-title {
    color: var(--accent-blue);
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.footer-text {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

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

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-blue);
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
}

.footer-copyright {
    color: var(--text-tertiary);
    font-size: 14px;
    margin: 0;
}

/* Light Theme Footer */
body[data-theme="light"] .site-footer {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px var(--shadow-sm);
}

body[data-theme="light"] .footer-title {
    color: var(--accent-blue);
}

body[data-theme="light"] .footer-text {
    color: var(--text-secondary);
}

body[data-theme="light"] .footer-links a {
    color: var(--text-secondary);
}

body[data-theme="light"] .footer-links a:hover {
    color: var(--accent-blue);
}

body[data-theme="light"] .footer-bottom {
    border-top: 1px solid var(--border-color);
}

body[data-theme="light"] .footer-copyright {
    color: var(--text-tertiary);
}

/* Contest Live Indicator */
.contest-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    border-radius: 20px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: white;
    margin-left: 8px;
    animation: pulse-glow 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.4);
}

#contests-link {
    display: flex;
    align-items: center;
}

.pulse-dot {
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 71, 87, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 71, 87, 0.6), 0 0 35px rgba(255, 71, 87, 0.3);
    }
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* Navbar Dropdown */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown-toggle {
    cursor: pointer;
    user-select: none;
    color: #e0e0e0;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: block;
    font-weight: 500;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.nav-dropdown-toggle:hover {
    background: rgba(74, 158, 255, 0.1);
    color: #4a9eff;
    transform: translateY(-2px);
}

/* Bridge area to prevent dropdown from hiding */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.98) 0%, rgba(35, 35, 50, 0.98) 100%);
    backdrop-filter: blur(10px);
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    margin-top: 8px;
    z-index: 1000;
    border: 1px solid rgba(74, 158, 255, 0.2);
    overflow: hidden;
    animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown-menu a {
    display: block;
    padding: 14px 22px;
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.3s ease;
    border-radius: 0;
    white-space: nowrap;
    font-weight: 500;
    font-size: 14px;
    position: relative;
}

.nav-dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, #4a9eff 0%, #667eea 100%);
    transition: height 0.3s ease;
}

.nav-dropdown-menu a:hover {
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
    padding-left: 28px;
}

.nav-dropdown-menu a:hover::before {
    height: 60%;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover {
    display: block;
}

.nav-dropdown:hover .nav-dropdown-toggle {
    background: rgba(74, 158, 255, 0.1);
    color: #4a9eff;
}

.btn-primary {
    background: linear-gradient(135deg, #4a9eff 0%, #7b68ee 100%);
    color: white;
    border: none;
    padding: 11px 26px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #7b68ee 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.5);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.02);
}

/* Inline error messages */
.error-message {
    display: none;
    color: #ff6b6b;
    font-size: 11px;
    margin-top: 4px;
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.2;
}

.error-message.show {
    display: block;
}

.form-input.error,
.form-textarea.error {
    border-color: #ff6b6b !important;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #2a2a2a;
    color: #e0e0e0;
    font-size: 14px;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #4a9eff;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
}

/* Red label for required fields with errors */
label.required-label,
.form-group label.required-label,
.modal-body label.required-label {
    color: #ff6b6b !important;
    font-weight: 600 !important;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Forms */
.form-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 40px;
    max-width: 450px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #b0b0b0;
    font-size: 14px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #2d2d2d;
    border: 1px solid #3d3d3d;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 15px;
}

.error-message {
    background-color: #ff475720;
    border: 1px solid #ff4757;
    color: #ff4757;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.success-message {
    background-color: #2ed57320;
    border: 1px solid #2ed573;
    color: #2ed573;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* Editor */
.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    height: calc(100vh - 140px);
    padding: 0;
    overflow: hidden;
}

.editor-panel {
    background-color: #1e1e1e;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    transition: background-color 0.3s ease;
}

/* Container for input/output in editor page */
.io-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
}

/* Output panel takes 2/3 of space */
.output-panel {
    flex: 2;
    min-height: 200px;
}

/* Input panel takes 1/3 of space */
.input-panel {
    flex: 1;
    min-height: 120px;
    max-height: 300px;
}

.panel-header {
    background-color: #252525;
    padding: 6px 12px;
    border-bottom: 1px solid #1e1e1e;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#code-editor {
    flex: 1;
    background-color: #1e1e1e;
    border: none;
    outline: none;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

#input-area, #output-area {
    flex: 1;
    width: 100%;
    min-height: 0;
    padding: 10px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: none;
    outline: none;
    resize: none;
    overflow-y: auto;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#output-area {
    color: #b0b0b0;
    scrollbar-width: thin;
    scrollbar-color: #4a9eff #2d2d2d;
}

#input-area {
    scrollbar-width: thin;
    scrollbar-color: #888 #2d2d2d;
}

/* Webkit scrollbar for input-area */
#input-area::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#input-area::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 5px;
}

#input-area::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

#input-area::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Webkit scrollbar styling for output-area */
#output-area::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#output-area::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 5px;
}

#output-area::-webkit-scrollbar-thumb {
    background: #4a9eff;
    border-radius: 5px;
}

#output-area::-webkit-scrollbar-thumb:hover {
    background: #5fadff;
}

/* Toolbar */
.toolbar {
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.toolbar-left, .toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toolbar-right {
    min-width: fit-content;
}

.btn-tool {
    padding: 11px 20px;
    background: linear-gradient(135deg, rgba(45, 45, 60, 0.6) 0%, rgba(35, 35, 50, 0.6) 100%);
    backdrop-filter: blur(10px);
    color: #e0e0e0;
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-tool:hover {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.15) 0%, rgba(123, 104, 238, 0.15) 100%);
    border-color: rgba(74, 158, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.2);
    color: #4a9eff;
}

.btn-run {
    background-color: #4a9eff !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    font-size: 15px !important;
    min-width: 100px;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 100;
}

.btn-run:hover {
    background-color: #3a8eef !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
}

/* Button Loading State */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
    cursor: not-allowed !important;
}

.btn-loading:hover {
    transform: none !important;
}

/* Spinner Animation */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dashboard */
.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.code-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.code-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-md);
    border-color: var(--border-color-hover);
}

.code-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.language-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.code-preview {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    margin: 15px 0;
    max-height: 100px;
    overflow: hidden;
}

.code-preview code {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.code-actions {
    display: flex;
    gap: 10px;
}

.btn-delete {
    background-color: #ff475720;
    color: #ff4757;
    border: 1px solid #ff4757;
}

/* Light Theme Dashboard */
body[data-theme="light"] .code-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-sm);
}

body[data-theme="light"] .code-card:hover {
    box-shadow: 0 4px 20px var(--shadow-md);
    border-color: var(--border-color-hover);
}

body[data-theme="light"] .code-preview {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

body[data-theme="light"] .code-preview code {
    color: var(--text-secondary);
}

/* Dashboard Search Bar */
.dashboard-search-wrapper {
    margin-bottom: 25px;
}

.dashboard-search-container {
    position: relative;
    max-width: 600px;
}

.dashboard-search-input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    background: var(--bg-card-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
}

.dashboard-search-input:hover {
    border-color: var(--border-color-hover);
}

.dashboard-search-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
    outline: none;
}

.search-loading-icon {
    display: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-blue);
    font-size: 16px;
}

.search-clear-btn {
    display: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.search-clear-btn:hover {
    color: #ff6b6b;
}

/* Dashboard Pagination */
.dashboard-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-card-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--accent-blue);
    border-radius: 8px;
    color: var(--accent-blue);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:not(:disabled):hover {
    background: rgba(74, 158, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
}

/* Dashboard Delete Modal */
.dashboard-delete-modal {
    background-color: var(--overlay-dark);
}

.dashboard-modal-content {
    max-width: 450px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-secondary) 100%);
    border-radius: 15px;
    padding: 0;
    border: 1px solid var(--border-color);
}

.dashboard-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-delete-title {
    color: #ff6b6b;
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #ff6b6b;
}

.dashboard-modal-body {
    padding: 30px;
}

.modal-text-primary {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.modal-code-title {
    color: var(--accent-blue);
}

.modal-text-secondary {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-top: 10px;
    margin-bottom: 0;
}

.dashboard-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-cancel-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--text-quaternary);
    border-radius: 8px;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.modal-cancel-btn:hover {
    background: var(--bg-card-secondary);
    border-color: var(--text-tertiary);
}

.modal-delete-btn {
    padding: 10px 24px;
    background: #ff6b6b !important;
    border: none;
    border-radius: 8px;
    color: white !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.modal-delete-btn:hover {
    background: #ff5252 !important;
}

/* Light Theme Dashboard Elements */
body[data-theme="light"] .dashboard-search-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

body[data-theme="light"] .dashboard-pagination {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

body[data-theme="light"] .pagination-btn {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

body[data-theme="light"] .pagination-info {
    color: var(--text-primary);
}

body[data-theme="light"] .dashboard-modal-content {
    background: var(--bg-tertiary);
}

/* Home Page */
.hero {
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 64px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #4a9eff 0%, #7b68ee 50%, #ff6b9d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.feature {
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #333;
    text-align: center;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* Utilities */
.hidden {
    display: none;
}

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

.mt-20 {
    margin-top: 20px;
}

/* ============================================ */
/* Problems Page Styles */
/* ============================================ */

.problems-container {
    min-height: calc(100vh - 60px);
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0f0f0f 100%);
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

.problems-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: radial-gradient(circle at 50% 0%, rgba(74, 158, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    transition: background 0.3s ease;
}

.problems-header {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(26, 26, 36, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(74, 158, 255, 0.2);
    padding: 50px 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.problems-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4a9eff, transparent);
}

/* Light Theme Problems Page */
body[data-theme="light"] .problems-container {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
}

body[data-theme="light"] .problems-container::before {
    background: radial-gradient(circle at 50% 0%, rgba(49, 130, 206, 0.08) 0%, transparent 70%);
}

body[data-theme="light"] .problems-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 250, 252, 0.95) 100%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-sm);
}

body[data-theme="light"] .problems-header::after {
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 1;
}

.problems-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.problems-title .emoji-icon {
    font-size: 52px;
    display: inline-block;
    animation: floatEmoji 3s ease-in-out infinite;
}

@keyframes floatEmoji {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.problems-title .gradient-text {
    background: linear-gradient(135deg, #4a9eff 0%, #7b68ee 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.problems-subtitle {
    font-size: 18px;
    color: #b0b0b0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

body[data-theme="light"] .problems-subtitle {
    color: var(--text-tertiary);
}

.stats-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: linear-gradient(135deg, rgba(45, 45, 60, 0.6) 0%, rgba(35, 35, 50, 0.6) 100%);
    backdrop-filter: blur(10px);
    padding: 28px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(74, 158, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4a9eff, #7b68ee, #667eea);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(74, 158, 255, 0.5);
    box-shadow: 0 12px 48px rgba(74, 158, 255, 0.25), 0 0 0 1px rgba(74, 158, 255, 0.1);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #4a9eff 0%, #7b68ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.filters-section {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.search-input {
    flex: 1;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.8) 0%, rgba(26, 26, 36, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 12px;
    color: #e0e0e0;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-input:focus {
    border-color: rgba(74, 158, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.1), 0 8px 32px rgba(74, 158, 255, 0.2);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: #666;
}

.filter-select {
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.8) 0%, rgba(26, 26, 36, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 12px;
    color: #e0e0e0;
    font-size: 15px;
    cursor: pointer;
    outline: none;
    min-width: 180px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

.filter-select:hover {
    border-color: rgba(74, 158, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(74, 158, 255, 0.15);
}

.filter-select:focus {
    border-color: rgba(74, 158, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.1);
}

.filter-select option {
    background: #1e1e2e;
    color: #e0e0e0;
}

.search-input option,
.filter-select option {
    padding: 8px;
}

.result-count {
    color: #888;
    font-size: 14px;
    white-space: nowrap;
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(74, 158, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(74, 158, 255, 0.1);
}

.problems-list-container {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.table-header {
    display: grid;
    grid-template-columns: 60px 1fr 120px 150px 120px 120px;
    gap: 20px;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.9) 0%, rgba(26, 26, 36, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-bottom: none;
    font-size: 12px;
    font-weight: 700;
    color: #4a9eff;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.problems-list {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.6) 0%, rgba(26, 26, 36, 0.6) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-top: none;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.problem-row {
    display: grid;
    grid-template-columns: 60px 1fr 120px 150px 120px 120px;
    gap: 20px;
    padding: 24px;
    border-bottom: 1px solid rgba(74, 158, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.problem-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #4a9eff, #7b68ee);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.problem-row:hover {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.08) 0%, rgba(123, 104, 238, 0.08) 100%);
    border-color: rgba(74, 158, 255, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.15);
}

.problem-row:hover::before {
    transform: scaleY(1);
}

.problem-row:last-child {
    border-bottom: none;
}

.col-id {
    display: flex;
    align-items: center;
}

.problem-id {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #4a9eff, #7b68ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.col-title {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.problem-title {
    font-size: 16px;
    font-weight: 700;
    color: #e0e0e0;
    letter-spacing: 0.2px;
    transition: color 0.3s ease;
}

.problem-row:hover .problem-title {
    color: #4a9eff;
}

.problem-description {
    font-size: 13px;
    color: #999;
    line-height: 1.5;
}

.problem-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.problem-tag {
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.15) 0%, rgba(123, 104, 238, 0.15) 100%);
    color: #4a9eff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(74, 158, 255, 0.3);
    transition: all 0.3s ease;
}

.problem-tag:hover {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.25) 0%, rgba(123, 104, 238, 0.25) 100%);
    transform: translateY(-2px);
}

.col-difficulty {
    display: flex;
    align-items: center;
}

.difficulty-badge {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 2px solid;
    transition: all 0.3s ease;
}

.difficulty-badge:hover {
    transform: scale(1.05);
}

.col-category {
    display: flex;
    align-items: center;
}

.category-text {
    font-size: 14px;
    color: #b0b0b0;
    font-weight: 600;
}

.col-acceptance {
    display: flex;
    align-items: center;
}

.acceptance-text {
    font-size: 14px;
    color: #00b894;
    font-weight: 700;
}

.col-action {
    display: flex;
    align-items: center;
    justify-content: center;
}

.solve-btn {
    padding: 10px 28px;
    background: linear-gradient(135deg, #4a9eff 0%, #7b68ee 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.solve-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #7b68ee 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.solve-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.5);
}

.solve-btn:hover::before {
    opacity: 1;
}

.solve-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.empty-state {
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.6) 0%, rgba(26, 26, 36, 0.6) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-top: none;
    border-radius: 0 0 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    justify-content: center;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-text {
    font-size: 20px;
    color: #e0e0e0;
    margin-bottom: 10px;
}

.empty-subtext {
    font-size: 14px;
    color: #888;
}

/* Pagination */
#pagination-container {
    padding: 50px 20px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    min-width: 45px;
    height: 45px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.8) 0%, rgba(26, 26, 36, 0.8) 100%);
    backdrop-filter: blur(10px);
    color: #e0e0e0;
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.15) 0%, rgba(123, 104, 238, 0.15) 100%);
    border-color: rgba(74, 158, 255, 0.5);
    color: #4a9eff;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(74, 158, 255, 0.2);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #4a9eff 0%, #7b68ee 100%);
    border-color: #4a9eff;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
    transform: scale(1.05);
}

.pagination-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(1);
}

.pagination-dots {
    color: #4a9eff;
    padding: 0 12px;
    font-size: 18px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Problem View Page */
.problem-view-container {
    min-height: calc(100vh - 60px);
    background-color: #0f0f0f;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
}

.problem-header {
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
    padding: 15px 20px;
}

.back-btn {
    padding: 8px 16px;
    background-color: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #3d3d3d;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 15px;
}

.problem-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.problem-main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background-color: #333;
    overflow: hidden;
}

.problem-left-panel {
    background-color: #1e1e1e;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.problem-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    background-color: #2d2d2d;
}

.problem-tab {
    padding: 12px 24px;
    background-color: transparent;
    color: #888;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.problem-tab.active {
    color: #4a9eff;
    background-color: #1e1e1e;
    border-bottom: 2px solid #4a9eff;
}

.problem-tab-content {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.problem-description {
    color: #e0e0e0;
}

.problem-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #4a9eff;
}

.description-text {
    line-height: 1.8;
    color: #b0b0b0;
    white-space: pre-line;
}

.example-box {
    background-color: #2d2d2d;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #3d3d3d;
}

.example-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #4a9eff;
}

.example-content {
    font-family: monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #e0e0e0;
}

.constraints-list {
    padding-left: 20px;
    margin: 0;
    color: #b0b0b0;
    line-height: 1.6;
}

.constraints-list li {
    margin-bottom: 8px;
}

.problem-right-panel {
    background-color: #1e1e1e;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.problem-right-panel .editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.problem-right-panel #code-editor {
    flex: 1;
    min-height: 400px;
    width: 100% !important;
    height: 100% !important;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
    flex-shrink: 0;
}

.editor-select {
    padding: 8px 12px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #3d3d3d;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.run-btn {
    padding: 10px 24px;
    background-color: #4a9eff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.run-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn {
    padding: 10px 24px;
    background-color: #00b894;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 10px;
}

.input-section {
    border-top: 1px solid #3d3d3d;
    background-color: #2d2d2d;
    max-height: 180px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.input-header {
    padding: 10px 15px;
    font-size: 13px;
    color: #888;
    font-weight: 500;
    background-color: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
    flex-shrink: 0;
}

.input-textarea {
    width: 100%;
    flex: 1;
    min-height: 60px;
    max-height: 300px;
    padding: 10px 15px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    border: none;
    outline: none;
    font-size: 13px;
    font-family: monospace;
    resize: vertical;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    scrollbar-width: thin;
    scrollbar-color: #888 #2d2d2d;
}

/* Webkit scrollbar for input-textarea */
.input-textarea::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.input-textarea::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

.input-textarea::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.input-textarea::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.output-text {
    background-color: #2d2d2d;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #3d3d3d;
    min-height: 200px;
    max-height: 600px;
    font-family: monospace;
    font-size: 14px;
    color: #e0e0e0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    overflow-x: auto;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #4a9eff #2d2d2d;
}

/* Webkit scrollbar styling for output-text */
.output-text::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.output-text::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 5px;
}

.output-text::-webkit-scrollbar-thumb {
    background: #4a9eff;
    border-radius: 5px;
}

.output-text::-webkit-scrollbar-thumb:hover {
    background: #5fadff;
}

.test-results-content {
    padding: 15px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: hidden;
}

.test-results-content::-webkit-scrollbar {
    width: 8px;
}

.test-results-content::-webkit-scrollbar-track {
    background: rgba(45, 45, 45, 0.5);
}

.test-results-content::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.3);
    border-radius: 4px;
}

.test-results-content::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 158, 255, 0.5);
}

.hint-item {
    margin-bottom: 15px;
}

.hint-button {
    width: 100%;
    padding: 12px 15px;
    background-color: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #3d3d3d;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.hint-toggle {
    font-size: 12px;
    color: #888;
}

.hint-content {
    margin-top: 10px;
    padding: 15px;
    background-color: #2d2d2d;
    border-radius: 6px;
    border: 1px solid #3d3d3d;
    color: #e0e0e0;
    line-height: 1.6;
}



/* Test Results Styling */
.test-results-section {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.test-case-result {
    background: #1a1a1a;
    border-left: 4px solid #888;
    margin: 10px 0;
    padding: 15px;
    border-radius: 4px;
}

.test-case-result.test-passed {
    border-left-color: #2ed573;
}

.test-case-result.test-failed {
    border-left-color: #ff4757;
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.test-number {
    color: #fff;
    font-size: 14px;
}

.test-status {
    color: #888;
    font-size: 12px;
}

.test-runtime {
    color: #888;
    font-size: 12px;
}

.test-details {
    display: grid;
    gap: 10px;
}

.test-detail {
    background: #0a0a0a;
    padding: 10px;
    border-radius: 4px;
}

.test-detail strong {
    display: block;
    color: #888;
    font-size: 12px;
    margin-bottom: 5px;
}

.test-detail pre {
    margin: 0;
    padding: 8px;
    background: #000;
    border-radius: 3px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow-x: auto;
}

.output-correct {
    border-left: 3px solid #2ed573;
}

.output-wrong {
    border-left: 3px solid #ff4757;
}

.error-text {
    color: #ff4757 !important;
}



/* ============================================
   CUSTOM NOTIFICATION MODAL
   ============================================ */
.notification-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.notification-modal.show {
    display: flex !important;
}

.notification-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    animation: slideUp 0.3s ease;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.notification-icon.error { color: #ff6b6b; }
.notification-icon.success { color: #2ed573; }
.notification-icon.warning { color: #ffa502; }
.notification-icon.info { color: #4a9eff; }

.notification-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #fff;
}

.notification-message {
    color: #b0b0b0;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    white-space: pre-line;
}

.notification-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.notification-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.notification-btn-primary {
    background: linear-gradient(135deg, #4a9eff 0%, #2ed573 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.notification-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ============================================ */

/* Tablets and Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
    /* Problems Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .table-header,
    .problem-row {
        grid-template-columns: 50px 1fr 100px 100px;
        gap: 10px;
    }

    .col-acceptance {
        display: none;
    }

    .header-col:nth-child(5) {
        display: none;
    }

    /* Problem View */
    .problem-main-content {
        grid-template-columns: 1fr;
        grid-template-rows: 50vh 50vh;
    }

    .problem-left-panel,
    .problem-right-panel {
        overflow-y: auto;
    }

    /* Editor */
    .editor-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        height: auto;
        min-height: calc(100vh - 140px);
    }

    /* Codes Grid */
    .codes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    /* Container */
    .container {
        padding: 30px 15px;
    }

    /* Navbar */
    .navbar {
        padding: 14px 20px;
    }

    .logo {
        font-size: 22px;
    }

    .nav-links a, .nav-links button {
        padding: 8px 14px;
        font-size: 14px;
    }
}

/* Tablets and Mobile (max-width: 768px) */
@media (max-width: 768px) {
    /* Hero Section */
    .hero h1 {
        font-size: 48px !important;
    }

    .hero p {
        font-size: 18px !important;
    }

    .hero {
        padding: 50px 15px;
    }

    /* Problems Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 15px;
    }

    /* Problems Header */
    .problems-title {
        font-size: 28px;
    }

    .problems-subtitle {
        font-size: 14px;
    }

    /* Filters Section */
    .filters-section {
        flex-direction: column;
        gap: 10px;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }

    /* Problems Table */
    .table-header {
        display: none; /* Hide headers on mobile */
    }

    .problems-list {
        border-radius: 8px;
    }

    .problem-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
        position: relative;
    }

    .col-id {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    .col-title {
        padding-right: 60px;
    }

    .col-difficulty,
    .col-category {
        display: inline-flex;
    }

    .col-action {
        justify-content: flex-start;
    }

    /* Problem View */
    .problem-header-content {
        flex-wrap: wrap;
        gap: 10px;
    }

    .back-btn {
        font-size: 13px;
        padding: 6px 12px;
    }

    .problem-tab {
        padding: 10px 16px;
        font-size: 13px;
    }

    .problem-tab-content {
        padding: 15px;
    }

    .section-title {
        font-size: 16px;
    }

    .problem-main-content {
        grid-template-rows: 40vh 60vh;
    }

    /* Editor Header */
    .editor-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .editor-select {
        font-size: 13px;
        padding: 6px 10px;
    }

    .run-btn,
    .submit-btn {
        font-size: 13px;
        padding: 8px 18px;
    }

    /* Toolbar */
    .toolbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-tool {
        padding: 8px 14px;
        font-size: 13px;
    }

    .btn-run {
        padding: 8px 20px !important;
        font-size: 14px !important;
        min-width: 80px;
    }

    /* Form */
    .form-card {
        padding: 25px;
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Navbar */
    .navbar {
        padding: 12px 15px;
        position: relative;
    }

    .logo {
        font-size: 20px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
        flex-direction: column;
        gap: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        border-bottom: 1px solid rgba(74, 158, 255, 0.2);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    .nav-links.active {
        max-height: 100vh;
        padding: 15px 0;
    }

    .nav-links a, 
    .nav-links button,
    .nav-links span {
        width: 100%;
        padding: 12px 20px !important;
        font-size: 15px !important;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links a:last-child,
    .nav-links button:last-child,
    .nav-links span:last-child {
        border-bottom: none;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        width: 100%;
        text-align: left;
        padding: 12px 20px !important;
    }

    .nav-dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        margin: 0;
        border-radius: 0;
        border: none;
        border-top: 1px solid rgba(74, 158, 255, 0.1);
        background: rgba(20, 20, 20, 0.95);
    }

    .nav-dropdown.active .nav-dropdown-menu {
        display: block;
    }

    .nav-dropdown-menu a {
        padding: 12px 30px !important;
        font-size: 14px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Contest Live Indicator - Mobile */
    .contest-live-indicator {
        padding: 1px 4px;
        font-size: 6px;
        margin-left: 3px;
        gap: 2px;
        letter-spacing: 0px;
    }
    
    .pulse-dot {
        width: 2px;
        height: 2px;
    }

    /* Profile Dropdown - Mobile */
    .profile-dropdown {
        width: 100%;
    }

    .profile-btn {
        width: 100%;
        justify-content: space-between;
        padding: 12px 20px !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        background: transparent !important;
    }

    .profile-dropdown-menu {
        position: static;
        min-width: 100%;
        margin: 0;
        border-radius: 0;
        border: none;
        border-top: 1px solid rgba(74, 158, 255, 0.1);
        background: rgba(20, 20, 20, 0.95);
        box-shadow: none;
    }

    .profile-dropdown.active .profile-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .profile-info {
        padding: 15px 20px;
    }

    .profile-avatar {
        width: 40px;
        height: 40px;
    }

    .profile-avatar svg {
        width: 24px;
        height: 24px;
    }

    .profile-menu-item {
        padding: 12px 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Dashboard */
    .codes-grid {
        grid-template-columns: 1fr;
    }

    .code-card {
        padding: 15px;
    }

    /* Container */
    .container {
        padding: 20px 15px;
    }

    /* Features */
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Notification Modal */
    .notification-content {
        padding: 30px 20px;
        max-width: 90%;
    }

    .notification-icon {
        font-size: 50px;
    }

    .notification-title {
        font-size: 20px;
    }

    .notification-message {
        font-size: 14px;
    }

    .notification-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .notification-btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Footer */
    .site-footer {
        padding: 30px 15px;
        margin-top: 60px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-title {
        font-size: 16px;
    }

    .footer-text {
        font-size: 13px;
    }

    .footer-links a {
        font-size: 13px;
    }

    .footer-copyright {
        font-size: 12px;
    }
}

/* Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
    /* Hero */
    .hero h1 {
        font-size: 36px !important;
    }

    .hero p {
        font-size: 16px !important;
    }

    .hero {
        padding: 40px 10px;
    }

    /* Problems */
    .problems-header {
        padding: 25px 15px;
    }

    .problems-title {
        font-size: 24px;
    }

    .problems-subtitle {
        font-size: 13px;
    }

    .problems-list-container {
        padding: 0 10px;
    }

    .problem-row {
        padding: 12px;
    }

    .problem-title {
        font-size: 14px;
    }

    .problem-description {
        font-size: 12px;
    }

    .difficulty-badge {
        padding: 4px 10px;
        font-size: 11px;
    }

    .solve-btn {
        padding: 6px 18px;
        font-size: 12px;
    }

    /* Problem View */
    .problem-main-content {
        grid-template-rows: 35vh 65vh;
    }

    .problem-tab {
        padding: 8px 12px;
        font-size: 12px;
    }

    .problem-tab-content {
        padding: 12px;
    }

    .section-title {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .description-text {
        font-size: 13px;
    }

    .example-box {
        padding: 12px;
    }

    .example-content {
        font-size: 12px;
    }

    /* Editor */
    .editor-header {
        padding: 8px 12px;
    }

    .editor-select {
        font-size: 12px;
        padding: 5px 8px;
    }

    .run-btn,
    .submit-btn {
        font-size: 12px;
        padding: 7px 15px;
        margin-left: 5px;
    }

    .input-section {
        max-height: 150px;
        min-height: 100px;
    }

    .input-header {
        padding: 8px 12px;
        font-size: 12px;
    }

    .input-textarea {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Form */
    .form-card {
        padding: 20px 15px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Navbar */
    .navbar {
        padding: 10px 12px;
    }

    .logo {
        font-size: 18px;
    }

    .mobile-menu-toggle {
        padding: 5px;
    }

    .hamburger-line {
        width: 22px;
        height: 2.5px;
    }

    .nav-links {
        top: 50px;
    }

    .nav-links a, 
    .nav-links button,
    .nav-links span {
        padding: 10px 15px !important;
        font-size: 14px !important;
    }

    .nav-dropdown-menu a {
        padding: 10px 25px !important;
        font-size: 13px !important;
    }
    
    /* Contest Live Indicator - Extra Small Mobile */
    .contest-live-indicator {
        padding: 0px 3px;
        font-size: 5px;
        margin-left: 2px;
        gap: 1px;
        letter-spacing: 0px;
    }
    
    .pulse-dot {
        width: 1.5px;
        height: 1.5px;
    }

    /* Toolbar */
    .toolbar {
        padding: 8px 10px;
    }

    .btn-tool {
        padding: 6px 10px;
        font-size: 12px;
    }

    .btn-run {
        padding: 7px 16px !important;
        font-size: 13px !important;
        min-width: 70px;
    }

    /* Dashboard */
    .code-card {
        padding: 12px;
    }

    .code-header h3 {
        font-size: 14px;
    }

    .language-badge {
        padding: 3px 8px;
        font-size: 10px;
    }

    .code-preview {
        padding: 10px;
        max-height: 80px;
    }

    .code-preview code {
        font-size: 11px;
    }

    /* Test Results */
    .test-case-result {
        padding: 12px;
    }

    .test-number,
    .test-status,
    .test-runtime {
        font-size: 11px;
    }

    .test-detail pre {
        font-size: 11px;
        padding: 6px;
    }

    /* Container */
    .container {
        padding: 15px 10px;
    }

    /* Notification Modal */
    .notification-content {
        padding: 25px 15px;
    }

    .notification-icon {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .notification-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .notification-message {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .notification-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Large Screens (min-width: 1440px) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .problems-container {
        max-width: 1600px;
        margin: 0 auto;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .codes-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
}

/* Extra Small Devices (max-width: 360px) */
@media (max-width: 360px) {
    .logo {
        font-size: 16px;
    }

    .nav-links a, .nav-links button {
        padding: 4px 8px;
        font-size: 11px;
    }

    .hero h1 {
        font-size: 28px !important;
    }

    .hero p {
        font-size: 14px !important;
    }

    .problems-title {
        font-size: 20px;
    }

    .btn-primary,
    .solve-btn,
    .run-btn,
    .submit-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* ============================================
   RESIZABLE PANELS (VS Code Style)
   ============================================ */

/* Vertical resizer (between explorer and code) */
.panel-resizer {
    width: 4px;
    background-color: #1e1e1e;
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.2s;
    z-index: 5;
    overflow: visible;
}

/* Add visible stretch arrows for file explorer resizer */
.panel-resizer::before {
    content: '⇔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    color: #ff9500;
    font-weight: bold;
    pointer-events: none;
    opacity: 1;
    transition: all 0.2s;
    text-shadow: 0 0 6px rgba(255, 149, 0, 0.6), 0 0 3px rgba(0, 0, 0, 0.8);
    z-index: 10;
    background: rgba(30, 30, 30, 0.8);
    padding: 4px 6px;
    border-radius: 4px;
}

.panel-resizer:hover::before {
    color: #ffb84d;
    font-size: 26px;
    text-shadow: 0 0 10px rgba(255, 149, 0, 0.9), 0 0 5px rgba(0, 0, 0, 0.8);
}

.panel-resizer:hover,
.panel-resizer:active {
    background-color: #007acc;
}

/* Vertical resizer (between code and output) */
.panel-resizer-vertical {
    width: 4px;
    background-color: #1e1e1e;
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.2s;
    z-index: 5;
    overflow: visible;
}

/* Add visible stretch arrows for vertical resizer */
.panel-resizer-vertical::before {
    content: '⇔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    color: #ff9500;
    font-weight: bold;
    pointer-events: none;
    opacity: 1;
    transition: all 0.2s;
    text-shadow: 0 0 6px rgba(255, 149, 0, 0.6), 0 0 3px rgba(0, 0, 0, 0.8);
    z-index: 10;
    background: rgba(30, 30, 30, 0.8);
    padding: 4px 6px;
    border-radius: 4px;
}

.panel-resizer-vertical:hover::before {
    color: #ffb84d;
    font-size: 26px;
    text-shadow: 0 0 10px rgba(255, 149, 0, 0.9), 0 0 5px rgba(0, 0, 0, 0.8);
}

.panel-resizer-vertical:hover,
.panel-resizer-vertical:active {
    background-color: #007acc;
}

/* Horizontal resizer (between output and input) */
.panel-resizer-horizontal {
    height: 4px;
    background-color: #1e1e1e;
    cursor: row-resize;
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.2s;
    z-index: 5;
    overflow: visible;
}

/* Add visible stretch arrows for horizontal resizer */
.panel-resizer-horizontal::before {
    content: '⇕';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    color: #ff9500;
    font-weight: bold;
    pointer-events: none;
    opacity: 1;
    transition: all 0.2s;
    text-shadow: 0 0 6px rgba(255, 149, 0, 0.6), 0 0 3px rgba(0, 0, 0, 0.8);
    z-index: 10;
    background: rgba(30, 30, 30, 0.8);
    padding: 4px 6px;
    border-radius: 4px;
}

.panel-resizer-horizontal:hover::before {
    color: #ffb84d;
    font-size: 26px;
    text-shadow: 0 0 10px rgba(255, 149, 0, 0.9), 0 0 5px rgba(0, 0, 0, 0.8);
}

.panel-resizer-horizontal:hover,
.panel-resizer-horizontal:active {
    background-color: #007acc;
}

/* User is actively dragging */
.resizing {
    user-select: none;
}

.resizing * {
    cursor: col-resize !important;
    user-select: none !important;
    pointer-events: none !important;
}

.resizing-horizontal {
    user-select: none;
}

.resizing-horizontal * {
    cursor: row-resize !important;
    user-select: none !important;
    pointer-events: none !important;
}

/* ============================================
   RESPONSIVE DESIGN FOR EDITOR/COMPILER
   ============================================ */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    /* Editor Container */
    .editor-container {
        flex-direction: column !important;
    }
    
    /* Code and Output side by side on tablet */
    #code-section {
        min-width: 100% !important;
        flex: 1 !important;
    }
    
    #output-section {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }
    
    /* Hide vertical resizer on tablet */
    #code-output-resizer {
        display: none !important;
    }
    
    /* File Explorer */
    .file-explorer {
        width: 220px !important;
        max-width: 300px !important;
    }
    
    /* Toolbar */
    .toolbar {
        padding: 6px 10px;
    }
    
    .btn-tool {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* Mobile Landscape (max-width: 768px) */
@media (max-width: 768px) {
    /* Force vertical layout */
    .editor-container {
        flex-direction: column !important;
    }
    
    /* Code section */
    #code-section {
        width: 100% !important;
        min-height: 300px !important;
    }
    
    /* Output section */
    #output-section {
        width: 100% !important;
        flex-direction: column !important;
        min-height: 200px !important;
    }
    
    /* Output and Input panels */
    .output-panel,
    .input-panel {
        width: 100% !important;
        min-height: 150px !important;
    }
    
    /* Hide all resizers on mobile */
    .panel-resizer,
    .panel-resizer-vertical,
    .panel-resizer-horizontal,
    #explorer-resizer,
    #code-output-resizer,
    #output-input-resizer {
        display: none !important;
    }
    
    /* File Explorer - Sidebar overlay on mobile */
    .file-explorer {
        position: fixed !important;
        left: 0 !important;
        top: 60px !important;
        width: 280px !important;
        max-width: 80% !important;
        height: calc(100vh - 60px) !important;
        z-index: 1000 !important;
        border-right: 1px solid #333 !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        transform: translateX(0);
        transition: transform 0.3s ease;
    }
    
    /* Make explorer header clickable to close on mobile */
    .file-explorer .explorer-header h3 {
        cursor: pointer;
        user-select: none;
        position: relative;
        padding-right: 30px;
    }
    
    .file-explorer .explorer-header h3::after {
        content: '✕';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 18px;
        color: #888;
        font-weight: normal;
    }
    
    .file-explorer .explorer-header h3:hover::after {
        color: #fff;
    }
    
    /* Toolbar */
    .toolbar {
        flex-wrap: wrap;
        padding: 8px;
        gap: 5px;
    }
    
    .toolbar-left,
    .toolbar-right {
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .btn-tool {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* Language select */
    #language-select {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* Run button */
    .btn-run {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
    
    /* Panel headers */
    .panel-header {
        padding: 5px 10px;
        font-size: 10px;
    }
    
    /* Code editor */
    #code-editor {
        min-height: 250px !important;
    }
    
    /* Output and Input areas */
    #output-area,
    #input-area {
        padding: 8px;
        font-size: 12px;
    }
    
    /* Modal adjustments */
    .modal-content {
        max-width: 95% !important;
        margin: 10px;
    }
    
    .floating-modal-content {
        max-width: 90% !important;
        margin: 10px;
    }
}

/* Mobile Portrait (max-width: 480px) */
@media (max-width: 480px) {
    /* Toolbar - Stack vertically */
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 6px;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-tool {
        flex: 1;
        padding: 8px 6px;
        font-size: 11px;
    }
    
    /* Code title */
    #code-title {
        font-size: 12px !important;
        margin-left: 10px !important;
    }
    
    /* Language select and Run button full width */
    #language-select,
    .btn-run {
        width: 100%;
        margin-top: 5px;
    }
    
    /* Smaller panels */
    #code-section {
        min-height: 250px !important;
    }
    
    #output-section {
        min-height: 150px !important;
    }
    
    .output-panel,
    .input-panel {
        min-height: 120px !important;
    }
    
    /* Panel headers smaller */
    .panel-header {
        padding: 4px 8px;
        font-size: 9px;
    }
    
    /* Code editor smaller */
    #code-editor {
        min-height: 200px !important;
    }
    
    /* Output and Input smaller font */
    #output-area,
    #input-area {
        padding: 6px;
        font-size: 11px;
    }
    
    /* File explorer actions */
    .explorer-actions {
        gap: 3px;
    }
    
    .icon-btn {
        font-size: 16px;
        padding: 4px;
    }
    
    /* Context menu */
    .context-menu {
        min-width: 150px;
    }
    
    .context-menu-item {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Toast notifications */
    .toast-notification {
        font-size: 13px !important;
        padding: 12px 16px !important;
        right: 10px !important;
        top: 10px !important;
        max-width: calc(100% - 20px);
    }
}

/* Extra Small Devices (max-width: 360px) */
@media (max-width: 360px) {
    .btn-tool {
        padding: 6px 4px;
        font-size: 10px;
    }
    
    #code-editor {
        min-height: 180px !important;
    }
    
    #output-area,
    #input-area {
        font-size: 10px;
        padding: 5px;
    }
    
    .panel-header {
        font-size: 8px;
        padding: 3px 6px;
    }
}

/* ============================================
   AGGRESSIVE MOBILE FIX FOR ALL PHONES
   Force vertical layout on any mobile device
   Last Updated: 2025-11-07
   ============================================ */

/* Catch-all for mobile devices up to 900px */
@media (max-width: 900px) {
    /* Force all editor containers to stack vertically */
    .editor-container,
    div[style*="display: flex"] {
        flex-direction: column !important;
    }
    
    /* Ensure code section takes full width */
    #code-section,
    .editor-panel {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }
    
    /* Ensure output/input sections stack below */
    #output-section,
    .io-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        flex-direction: column !important;
    }
    
    /* Hide all horizontal resizers on mobile */
    .panel-resizer,
    #code-output-resizer {
        display: none !important;
    }
}

/* Specific fix for problematic phones (e.g., some Android phones) */
@media (max-width: 900px) and (orientation: portrait),
       (max-width: 768px) and (orientation: landscape) {
    
    /* Override any inline styles that might force horizontal layout */
    div[style*="display: flex"][style*="flex-direction: row"],
    div[style*="display:flex"][style*="flex-direction:row"] {
        flex-direction: column !important;
    }
    
    /* Force vertical stacking with !important to override inline styles */
    .editor-container > * {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Landscape mode on phones - still force vertical */
@media (max-height: 600px) and (orientation: landscape) {
    .editor-container {
        flex-direction: column !important;
    }
    
    .toolbar {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 900px) {
        /* iOS Safari specific fixes */
        .editor-container {
            -webkit-flex-direction: column !important;
            flex-direction: column !important;
        }
        
        #code-section, #output-section {
            width: 100% !important;
            -webkit-box-flex: 1;
            flex: 1 !important;
        }
    }
}

/* Force vertical layout on problem page editor */
@media (max-width: 900px) {
    .problem-split-container,
    .problem-right-panel,
    .problem-editor-section {
        flex-direction: column !important;
    }
}

/* ========================================
   FOUNDER PAGE - LIGHT THEME
   ======================================== */

/* Founder page container background */
body[data-theme="light"] .container {
    background: transparent !important;
}

/* Main founder card (Aman Shrivastav) */
body[data-theme="light"] .container > div:nth-child(2) > div {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%) !important;
    border: 2px solid #3182ce !important;
    box-shadow: 0 15px 50px rgba(49, 130, 206, 0.15) !important;
}

/* Leadership team cards (CTO & CMO) */
body[data-theme="light"] .container > div:nth-child(4) > div {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%) !important;
    border-color: #3182ce !important;
    box-shadow: 0 10px 40px rgba(49, 130, 206, 0.1) !important;
}

/* All h2 headings (names) */
body[data-theme="light"] .container h2 {
    color: #1a202c !important;
}

/* Subtitle text (descriptions, locations) */
body[data-theme="light"] .container p[style*="color: #b0b0b0"],
body[data-theme="light"] .container p[style*="color: #888"] {
    color: #4a5568 !important;
}

/* CTA section at bottom */
body[data-theme="light"] .container > div:last-child {
    background: linear-gradient(135deg, rgba(49, 130, 206, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%) !important;
    border: 1px solid rgba(49, 130, 206, 0.3) !important;
}

body[data-theme="light"] .container > div:last-child h3 {
    color: #1a202c !important;
}

body[data-theme="light"] .container > div:last-child p {
    color: #4a5568 !important;
}

/* ========================================
   CAREERS PAGE - LIGHT THEME
   ======================================== */

/* Hero section subtitle */
body[data-theme="light"] .container > div:first-child p {
    color: #4a5568 !important;
}

/* Why Join Us section */
body[data-theme="light"] .container > div:nth-child(2) {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%) !important;
    border: 1px solid #cbd5e0 !important;
}

body[data-theme="light"] .container > div:nth-child(2) h3 {
    color: #1a202c !important;
}

body[data-theme="light"] .container > div:nth-child(2) p {
    color: #4a5568 !important;
}

/* Open Positions heading */
body[data-theme="light"] .container > h2 {
    color: #1a202c !important;
}

/* Job cards */
body[data-theme="light"] .job-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%) !important;
    border: 1px solid #cbd5e0 !important;
}

body[data-theme="light"] .job-card h3 {
    color: #3182ce !important;
}

body[data-theme="light"] .job-card p {
    color: #4a5568 !important;
}

body[data-theme="light"] .job-card strong {
    color: #1a202c !important;
}

body[data-theme="light"] .job-card:hover {
    box-shadow: 0 10px 40px rgba(49, 130, 206, 0.2) !important;
    border-color: #3182ce !important;
}

/* Application Modal */
body[data-theme="light"] .modal {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

body[data-theme="light"] .modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%) !important;
    border: 2px solid #3182ce !important;
    box-shadow: 0 20px 60px rgba(49, 130, 206, 0.3) !important;
}

body[data-theme="light"] .modal-header {
    background: linear-gradient(135deg, #3182ce 0%, #10b981 100%) !important;
}

body[data-theme="light"] .modal-header h2 {
    color: #ffffff !important;
}

body[data-theme="light"] .modal-body {
    background: #ffffff !important;
}

body[data-theme="light"] .modal-body label {
    color: #1a202c !important;
}

body[data-theme="light"] .modal-body input,
body[data-theme="light"] .modal-body select {
    background: rgba(226, 232, 240, 0.3) !important;
    border: 1px solid #cbd5e0 !important;
    color: #1a202c !important;
}

body[data-theme="light"] .modal-body input:focus,
body[data-theme="light"] .modal-body select:focus {
    border-color: #3182ce !important;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1) !important;
}

body[data-theme="light"] .modal-body input[readonly] {
    background: rgba(49, 130, 206, 0.1) !important;
    border: 1px solid #3182ce !important;
    color: #3182ce !important;
}

body[data-theme="light"] .modal-body small {
    color: #4a5568 !important;
}

body[data-theme="light"] .modal-body button[type="button"] {
    background: transparent !important;
    border: 1px solid #cbd5e0 !important;
    color: #4a5568 !important;
}

body[data-theme="light"] .modal-body button[type="button"]:hover {
    background: #edf2f7 !important;
    border-color: #3182ce !important;
    color: #2d3748 !important;
}

body[data-theme="light"] .modal-body button[type="submit"] {
    background: linear-gradient(135deg, #3182ce 0%, #10b981 100%) !important;
}

body[data-theme="light"] #successMessage h3 {
    color: #10b981 !important;
}

body[data-theme="light"] #successMessage p {
    color: #4a5568 !important;
}

/* Scrollbar for modal */
body[data-theme="light"] .modal-content::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3) !important;
}

body[data-theme="light"] .modal-content::-webkit-scrollbar-thumb {
    background: rgba(49, 130, 206, 0.5) !important;
}

body[data-theme="light"] .modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(49, 130, 206, 0.7) !important;
}

/* ============================================================================
   LOGIN REQUIRED MODAL
   ============================================================================ */

.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.login-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.login-modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideUp 0.3s ease;
    z-index: 10001;
}

.login-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s;
}

.login-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.login-modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.login-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.login-modal-message {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
}

.login-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-modal-btn {
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.login-modal-btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #0066cc 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.login-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 158, 255, 0.4);
}

.login-modal-btn-secondary {
    background: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
}

.login-modal-btn-secondary:hover {
    background: rgba(74, 158, 255, 0.1);
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .login-modal-icon {
        font-size: 48px;
    }
    
    .login-modal-title {
        font-size: 20px;
    }
    
    .login-modal-message {
        font-size: 14px;
    }
}

/* Light Theme */
body[data-theme="light"] .login-modal-content {
    background: var(--bg-tertiary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* ============================================================================
   LOCKED BUTTON STYLES
   ============================================================================ */

.btn-locked {
    position: relative;
    cursor: not-allowed;
    opacity: 0.7;
    background: rgba(136, 136, 136, 0.2) !important;
    color: #888 !important;
    border: 1px solid #555 !important;
}

.btn-locked:hover {
    opacity: 0.8;
    transform: none !important;
}

.btn-locked::before {
    content: "🔒 ";
}

/* Locked feature overlay */
.feature-locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    cursor: pointer;
    transition: all 0.3s;
}

.feature-locked-overlay:hover {
    background: rgba(0, 0, 0, 0.7);
}

.feature-locked-text {
    color: white;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stats card locked state */
.stat-locked {
    opacity: 0.6;
    position: relative;
}

.stat-locked .stat-value {
    filter: blur(4px);
}

.stat-locked::after {
    content: "🔒 Login";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}


