/* AqlArena - Main Stylesheet */

:root {
    --primary-purple: #6C4EFF;
    --primary-purple-dark: #5a3dd4;
    --primary-purple-light: #8b6fff;
    --primary-purple-rgb: 108, 78, 255;
    --secondary-purple: #9B59B6;
    --white: #FFFFFF;
    --dark: #2C3E50;
    --gray: #95A5A6;
    --light-gray: #F8F9FA;
    --success: #2ECC71;
    --warning: #F39C12;
    --danger: #E74C3C;
    --info: #3498DB;
    --border-radius: 1rem;
    --border-radius-lg: 1.5rem;
    --box-shadow: 0 10px 40px rgba(108, 78, 255, 0.15);
    --box-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-purple-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-primary-purple {
    color: var(--primary-purple) !important;
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
}

.btn-primary-purple {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    color: white;
    box-shadow: 0 4px 15px rgba(108, 78, 255, 0.3);
}

.btn-primary-purple:hover {
    background: linear-gradient(135deg, var(--primary-purple-dark), var(--primary-purple));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 78, 255, 0.4);
}

.btn-outline-primary-purple {
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
    background: transparent;
}

.btn-outline-primary-purple:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand-text {
    color: var(--dark);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark);
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-purple);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    background: white;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

/* Forms */
.form-control {
    border-radius: 0.75rem;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 0.2rem rgba(108, 78, 255, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.5em 1em;
    border-radius: 50px;
}

/* Hero Section */
.hero-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.hero-title {
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
}

.hero-illustration {
    position: relative;
    min-height: 400px;
}

.floating-card {
    position: absolute;
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: float 3s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: 0;
    animation-delay: 0s;
}

.card-2 {
    top: 40%;
    right: 0;
    animation-delay: 1s;
}

.card-3 {
    bottom: 20%;
    left: 10%;
    animation-delay: 2s;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.card-content small {
    display: block;
    font-size: 0.75rem;
}

.card-content h5 {
    font-size: 1rem;
    margin: 0;
}

.hero-main-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-lg);
    padding: 2rem;
    min-width: 350px;
}

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

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

.quiz-badge {
    background: var(--primary-purple);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.quiz-timer {
    background: var(--danger);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.quiz-question {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.option {
    background: #e9ecef;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
    border: 1px solid #dee2e6;
}

.quiz-options .option img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: inline-block;
    flex-shrink: 0;
}

.option-shape {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.option-shape.triangle {
    background: var(--danger);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.option-shape.diamond {
    background: var(--info);
    transform: rotate(45deg);
    width: 15px;
    height: 15px;
}

.option-shape.circle {
    background: var(--warning);
    border-radius: 50%;
}

.option-shape.square {
    background: var(--success);
}

@media (max-width: 576px) {
    .quiz-question {
        font-size: 1.05rem;
        margin-bottom: 1rem;
    }

    .quiz-options {
        gap: 0.5rem;
    }

    .option {
        padding: 0.6rem;
        border-radius: 0.65rem;
        font-size: 0.95rem;
        gap: 0.45rem;
    }

    .quiz-options .option img {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 360px) {
    .quiz-options {
        grid-template-columns: 1fr;
    }
}

/* Step Cards */
.step-card {
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-10px);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: rgba(108, 78, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-purple);
    margin: 0 auto;
}

/* Feature Cards */
.feature-card {
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg) !important;
}

.feature-icon {
    border-radius: 12px;
}

/* CTA Section */
.cta-card {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    position: relative;
    overflow: hidden;
}

.cta-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: radial-gradient(circle at 2px 2px, white 1px, transparent 0);
    background-size: 40px 40px;
}

/* Game Screen */
.game-screen {
    background: var(--light-gray);
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

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

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

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-lg);
}

/* Responsive */
@media (max-width: 991.98px) {
    .hero-illustration {
        min-height: 300px;
    }
    
    .floating-card {
        display: none;
    }
    
    .hero-main-card {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .pin-display {
        font-size: 2.5rem !important;
    }
    
    .answer-btn {
        min-height: 80px !important;
        font-size: 1rem !important;
    }
}

/* Utility Classes */
.min-vh-75 {
    min-height: 75vh;
}

.tracking-wide {
    letter-spacing: 0.1em;
}

.bg-primary-purple {
    background-color: var(--primary-purple) !important;
}

.bg-opacity-10 {
    --bs-bg-opacity: 0.1;
}

/* Pin Input Styling */
.pin-input {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5em;
}

/* Timer Animation */
.timer-pulse {
    animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Shape Icons for Answers */
.shape-red { background-color: #E74C3C; }
.shape-blue { background-color: #3498DB; }
.shape-yellow { background-color: #F1C40F; }
.shape-green { background-color: #2ECC71; }

/* Leaderboard Styling */
.leaderboard-item {
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(5px);
}

/* Answer Button States */
.answer-btn {
    position: relative;
    overflow: hidden;
}

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

.answer-btn:hover::before {
    left: 100%;
}

/* Prevent text selection during game */
.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Fullscreen game mode */
.game-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: var(--light-gray);
}
