/* ============================================================================
   BLAZEBPF - Complete Styles (CLEAN & OPTIMIZED)
   ============================================================================ */

/* Root Variables */
:root {
    --primary-color: #FF6B35;
    --secondary-color: #FF4500;
    --accent-color: #00d2ff;
    --success-color: #28a745;
    --error-color: #dc3545;
    --text-primary: #ffffff;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(0,0,0,0.8);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    display: flex;
    gap: 20px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* ==================== HEADER & AUTH ==================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    text-align: center;
}

.header-left {
    flex: 1;
}

.header-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.title {
    font-size: 3em;
    margin: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title .bee-animated {
    display: inline-block;
    animation: beeFly 8s ease-in-out infinite;
    transform-origin: center;
}

@keyframes beeFly {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
    12.5% { transform: translate(8px, -6px) rotate(15deg); opacity: 0.85; }
    25% { transform: translate(12px, 0) rotate(0deg); opacity: 1; }
    37.5% { transform: translate(8px, 6px) rotate(-15deg); opacity: 0.85; }
    50% { transform: translate(0, 8px) rotate(-25deg); opacity: 0.7; }
    62.5% { transform: translate(-8px, 6px) rotate(-15deg); opacity: 0.85; }
    75% { transform: translate(-12px, 0) rotate(0deg); opacity: 1; }
    87.5% { transform: translate(-8px, -6px) rotate(15deg); opacity: 0.85; }
    100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
}

/* Auth Button */
.auth-button {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
}

/* ==================== CODE EDITOR ==================== */
.CodeMirror {
    height: 610px !important;
    border: 2px solid #666666 !important;
    border-radius: 10px !important;
    font-family: 'Courier New', monospace !important;
    font-size: 14px !important;
    background: #000000 !important;
    color: #ffffff !important;
}

.CodeMirror-focused {
    border-color: #ffffff !important;
}

/* ==================== BUTTONS ==================== */
.buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

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

/* ==================== MODALS ==================== */
.modal,
.auth-modal,
#challenge-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
}

.modal.show,
.auth-modal.show,
#challenge-modal.show {
    display: flex !important;
}

.modal-content,
.auth-modal-content,
#challenge-modal .bytecode-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

#challenge-modal .bytecode-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal .close,
.auth-modal-close,
#challenge-modal .close-bytecode {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    transition: color 0.2s;
}

.modal .close:hover,
.auth-modal-close:hover,
#challenge-modal .close-bytecode:hover {
    color: var(--accent-color);
}

/* ==================== LEARNING SIDEBAR ==================== */
.learning-sidebar {
    width: 320px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.learning-sidebar.collapsed {
    width: 0;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.sidebar-content {
    transition: all 0.3s ease;
}

.learning-sidebar.collapsed .sidebar-content {
    display: none;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .title {
        font-size: 2em;
    }
    
    .auth-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8em;
    }
    
    .auth-button {
        padding: 9px 18px;
        font-size: 13px;
    }
}
/* ============================================================================
   DROPDOWN STYLES
   ============================================================================ */

.custom-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
}

.dropdown-button {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 107, 53, 0.1));
    color: rgba(255, 107, 53, 0.9);
    border: 1px solid rgba(255, 107, 53, 0.3);
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-button:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.3), rgba(255, 107, 53, 0.2));
    border-color: rgba(255, 107, 53, 0.5);
    transform: translateY(-2px);
}

.dropdown-button.open {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.4), rgba(255, 107, 53, 0.3));
    border-color: rgba(255, 107, 53, 0.6);
    color: #FF6B35;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.dropdown-menu.open {
    max-height: 400px;
    opacity: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.dropdown-item {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(255, 107, 53, 0.2);
    color: #FF6B35;
    border-left-color: #FF6B35;
    padding-left: 20px;
}

.dropdown-item:active {
    background: rgba(255, 107, 53, 0.3);
}

/* Scrollbar styling para dropdown */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 107, 53, 0.1);
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.4);
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.6);
}