/* Kuwait Hackathon CTF Platform - Main Styles */

:root {
    --primary-color: #00d4ff;
    --secondary-color: #7b2cbf;
    --accent-color: #ff006e;
    --dark-bg: #0a0a1a;
    --darker-bg: #050510;
    --card-bg: #12122a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --success-color: #00ff88;
    --warning-color: #ffcc00;
    --danger-color: #ff4444;
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #7b2cbf 100%);
    --gradient-accent: linear-gradient(135deg, #ff006e 0%, #7b2cbf 100%);
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at top, rgba(123, 44, 191, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
}

/* Navbar */
.navbar {
    background: rgba(10, 10, 26, 0.95);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    font-size: 1.8rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.btn-register {
    background: var(--gradient-primary);
    border-radius: 25px;
    color: var(--text-primary) !important;
    padding: 0.5rem 1.5rem !important;
}

.btn-logout {
    border: 1px solid var(--accent-color);
    border-radius: 25px;
    color: var(--accent-color) !important;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300d4ff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-badge {
    display: inline-block;
    background: var(--gradient-accent);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Buttons */
.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.5);
    color: white;
}

.btn-secondary-custom {
    background: transparent;
    border: 2px solid var(--primary-color);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
}

/* Cards */
.card-custom {
    background: var(--card-bg);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.card-custom:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Form Styles */
.form-container {
    max-width: 500px;
    margin: 3rem auto;
    padding: 2rem;
}

.form-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 3rem;
}

.form-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.form-control {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.btn-submit {
    width: 100%;
    background: var(--gradient-primary);
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    color: white;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

/* Dashboard */
.dashboard-header {
    padding: 3rem 0;
    background: linear-gradient(180deg, rgba(123, 44, 191, 0.1) 0%, transparent 100%);
}

.stats-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
}

.stats-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stats-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Challenge Cards */
.challenge-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.challenge-card:hover {
    border-color: rgba(0, 212, 255, 0.4);
}

.challenge-card.solved {
    border-color: var(--success-color);
    background: rgba(0, 255, 136, 0.05);
}

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

.challenge-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.challenge-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-web {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
}

.badge-forensics {
    background: rgba(123, 44, 191, 0.2);
    color: #b366ff;
}

.badge-misc {
    background: rgba(255, 0, 110, 0.2);
    color: var(--accent-color);
}

.badge-solved {
    background: var(--success-color);
    color: var(--dark-bg);
}

.challenge-theme {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.challenge-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.challenge-link:hover {
    color: var(--accent-color);
}

.flag-input-group {
    display: flex;
    gap: 0.5rem;
}

.flag-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    font-family: 'Courier New', monospace;
}

.flag-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.btn-flag {
    background: var(--gradient-primary);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-flag:hover {
    transform: scale(1.05);
}

/* Footer */
.footer {
    padding: 2rem 0;
    background: var(--darker-bg);
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    color: var(--text-secondary);
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
}

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

.alert-danger {
    background: rgba(255, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(255, 68, 68, 0.3);
}

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

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

/* Error messages in forms */
.errorlist {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    color: var(--danger-color);
    font-size: 0.85rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature-text {
    color: var(--text-secondary);
}

/* Text utilities override */
.text-muted {
    color: var(--text-secondary) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .form-card {
        padding: 2rem 1.5rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}
