/* =============================
   ASTROX ADMIN DASHBOARD STYLE
   Ultra-Modern Cyber Design 2026
   ============================= */

:root {
    --bg-main: #02040a;
    --bg-secondary: #0b0f1a;
    --bg-tertiary: #1a2540;
    --bg-card: rgba(13, 17, 28, 0.8);
    --bg-card-hover: rgba(18, 24, 38, 0.95);
    --bg-input: rgba(255, 255, 255, 0.03);
    --bg-input-focus: rgba(255, 255, 255, 0.08);
    
    --primary: #00f2ff;
    --primary-glow: rgba(0, 242, 255, 0.3);
    --primary-dark: rgba(0, 242, 255, 0.1);
    --secondary: #7000ff;
    --secondary-glow: rgba(112, 0, 255, 0.3);
    --secondary-dark: rgba(112, 0, 255, 0.1);
    
    --accent: linear-gradient(135deg, #00f2ff 0%, #7000ff 100%);
    --accent-hover: linear-gradient(135deg, #33f5ff 0%, #8a33ff 100%);
    --accent-subtle: linear-gradient(135deg, rgba(0, 242, 255, 0.2) 0%, rgba(112, 0, 255, 0.2) 100%);
    
    --success: #00ff95;
    --success-glow: rgba(0, 255, 149, 0.3);
    --danger: #ff0055;
    --danger-glow: rgba(255, 0, 85, 0.3);
    --warning: #ffcc00;
    --warning-glow: rgba(255, 204, 0, 0.3);
    --info: #00d4ff;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-tertiary: #6b7280;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 242, 255, 0.4);
    
    --radius: 16px;
    --radius-lg: 24px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.9);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    opacity: 0.8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 242, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(112, 0, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 242, 255, 0.02) 0%, transparent 60%);
    background-attachment: fixed;
}

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */

header {
    background: rgba(11, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

header:hover {
    border-bottom-color: var(--primary);
    box-shadow: 0 8px 40px rgba(0, 242, 255, 0.1);
}

header h1 {
    font-size: 1.75rem;
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: -0.5px;
}

nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    z-index: -1;
    transition: left 0.3s ease;
}

nav a:hover::before,
nav a.active::before {
    left: 0;
}

nav a:hover,
nav a.active {
    color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */

main {
    padding: 2.5rem;
    max-width: 1600px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

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

/* ============================================================================
   CARDS & CONTAINERS
   ============================================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.5rem;
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.card-header-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-group {
    margin-bottom: 1.75rem;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

label .required {
    color: var(--danger);
    margin-left: 0.25rem;
}

input,
select,
textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.95rem 1.25rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-fast);
    font-size: 1rem;
    font-family: inherit;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background: var(--bg-input-focus);
    box-shadow: 0 0 20px var(--primary-glow);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300f2ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    padding: 0.95rem 1.75rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-dark);
    color: var(--secondary);
    border: 1px solid var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary);
    color: white;
    box-shadow: 0 0 20px var(--secondary-glow);
}

.btn-danger {
    background: rgba(255, 0, 85, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 0 20px var(--danger-glow);
}

.btn-success {
    background: rgba(0, 255, 149, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.btn-success:hover {
    background: var(--success);
    color: #000;
    box-shadow: 0 0 20px var(--success-glow);
}

.btn-warning {
    background: rgba(255, 204, 0, 0.1);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.btn-warning:hover {
    background: var(--warning);
    color: #000;
    box-shadow: 0 0 20px var(--warning-glow);
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

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

/* ============================================================================
   TABLES
   ============================================================================ */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    background: rgba(0, 242, 255, 0.02);
    font-weight: 800;
}

td {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background: rgba(0, 242, 255, 0.05);
    border-left: 3px solid var(--primary);
    padding-left: 2px;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: var(--transition-fast);
}

.badge-success {
    background: rgba(0, 255, 149, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 255, 149, 0.3);
}

.badge-success:hover {
    background: rgba(0, 255, 149, 0.25);
    box-shadow: 0 0 15px var(--success-glow);
}

.badge-danger {
    background: rgba(255, 0, 85, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 0, 85, 0.3);
}

.badge-danger:hover {
    background: rgba(255, 0, 85, 0.25);
    box-shadow: 0 0 15px var(--danger-glow);
}

.badge-warning {
    background: rgba(255, 204, 0, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 204, 0, 0.3);
}

.badge-warning:hover {
    background: rgba(255, 204, 0, 0.25);
    box-shadow: 0 0 15px var(--warning-glow);
}

.badge-info {
    background: rgba(0, 212, 255, 0.15);
    color: var(--info);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge-info:hover {
    background: rgba(0, 212, 255, 0.25);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.badge-secondary {
    background: rgba(160, 160, 176, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(160, 160, 176, 0.2);
}

/* ============================================================================
   QUESTION ITEMS
   ============================================================================ */

.question-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    transition: var(--transition);
}

.question-item:hover {
    border-color: var(--primary);
    background: rgba(0, 242, 255, 0.05);
}

.question-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.remove-question {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.remove-question:hover {
    color: var(--danger);
    background: rgba(255, 0, 85, 0.1);
}

/* ============================================================================
   MODALS
   ============================================================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    max-width: 600px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.modal-close:hover {
    color: var(--danger);
    background: rgba(255, 0, 85, 0.1);
}

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

/* ============================================================================
   ALERTS & NOTIFICATIONS
   ============================================================================ */

.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid;
    animation: slideInDown 0.3s ease;
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.alert-success {
    background: rgba(0, 255, 149, 0.1);
    border-color: rgba(0, 255, 149, 0.3);
    color: var(--success);
}

.alert-danger {
    background: rgba(255, 0, 85, 0.1);
    border-color: rgba(255, 0, 85, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(255, 204, 0, 0.1);
    border-color: rgba(255, 204, 0, 0.3);
    color: var(--warning);
}

.alert-info {
    background: rgba(0, 242, 255, 0.1);
    border-color: rgba(0, 242, 255, 0.3);
    color: var(--info);
}

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

/* ============================================================================
   PROGRESS BARS
   ============================================================================ */

.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.25rem;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    nav a {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    main {
        padding: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1rem;
    }
    
    nav {
        gap: 0.25rem;
    }
    
    nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card-header h2 {
        font-size: 1.25rem;
    }
}
