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

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #00ff88;
    --danger: #ff4757;
    --warning: #ffa500;
    --dark: #1a1a2e;
    --darker: #0f0f1e;
    --text: #eee;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    color: var(--text);
}

/* NAVIGATION */
.nav {
    background: rgba(0,0,0,0.9);
    padding: 20px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #fff;
}

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

/* CARDS */
.card {
    background: rgba(0,0,0,0.8);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    border: 2px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.card h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 2rem;
}

.card h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(0,0,0,0.8);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid rgba(255,255,255,0.1);
}

.stat-card h3 {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 10px;
}

.stat-card p {
    color: var(--text);
    font-size: 1.1rem;
}

/* BUTTONS */
.btn {
    padding: 15px 35px;
    background: #fff;
    color: var(--primary);
    border: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,255,255,0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 2px solid #fff;
}

.btn-success {
    background: var(--success);
    color: #000;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* FORMS */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

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

/* AUTH PAGES */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    background: rgba(0,0,0,0.85);
    padding: 50px;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    border: 2px solid rgba(255,255,255,0.1);
}

.auth-logo {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 30px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text);
}

.auth-link a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

/* MESSAGES */
.message {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 5px solid;
}

.message.success {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--success);
    color: var(--success);
}

.message.error {
    background: rgba(255, 71, 87, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

.message.info {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary);
    color: #fff;
}

/* TEST */
.question-card {
    background: rgba(0,0,0,0.8);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    border: 2px solid rgba(255,255,255,0.1);
}

.question-number {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 30px;
    line-height: 1.6;
}

.options {
    display: grid;
    gap: 15px;
}

.option {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
}

.option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option label {
    cursor: pointer;
    flex: 1;
    font-size: 1.1rem;
}

/* RESULT */
.result-card {
    text-align: center;
    padding: 60px;
}

.iq-score {
    font-size: 8rem;
    font-weight: 900;
    margin: 30px 0;
    text-shadow: 0 0 40px currentColor;
}

.category-badge {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 20px 0;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

table th {
    color: var(--primary);
    font-weight: 700;
}

/* CERTIFICATE */
.certificate {
    background: #fff;
    color: #000;
    padding: 60px;
    max-width: 800px;
    margin: 0 auto;
    border: 10px solid var(--primary);
    position: relative;
}

.certificate-header {
    text-align: center;
    margin-bottom: 40px;
}

.certificate-title {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.certificate-body {
    text-align: center;
    font-size: 1.3rem;
    line-height: 2;
    margin: 40px 0;
}

.certificate-score {
    font-size: 5rem;
    font-weight: 900;
    color: var(--primary);
    margin: 30px 0;
}

.certificate-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 2px solid #ccc;
}

/* PROGRESS */
.progress-bar {
    background: rgba(255,255,255,0.1);
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 100%;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 25px;
    }
    
    .auth-container {
        padding: 30px 20px;
    }
    
    .iq-score {
        font-size: 5rem;
    }
}

/* ADMIN */
.admin-section {
    margin-bottom: 50px;
}

.user-list {
    display: grid;
    gap: 15px;
}

.user-item {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.badge {
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-premium {
    background: var(--success);
    color: #000;
}

.badge-admin {
    background: var(--danger);
    color: #fff;
}
