@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --card-bg: rgba(255, 255, 255, 0.98);
    --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    padding-top: 55px;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--primary-gradient);
    line-height: 1.6;
}

/* Container & Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Screen Management */
.screen {
    display: none;
    min-height: auto;
    padding: 20px 0;
    animation: fadeInUp 0.1s ease-out;
}

.screen.active {
    display: block;
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

/* Buttons */
.btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

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

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

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-gradient);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.3);
}

.btn-success {
    background: var(--success-gradient);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.btn-warning {
    background: var(--warning-gradient);
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.3);
}

/* Option Cards */
.option-card {
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    position: relative;
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s;
}

.option-card:hover::before {
    left: 100%;
}

.option-card:hover {
    border-color: #667eea;
    transform: translateX(5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.option-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
    transform: translateX(0) scale(1.02);
}

.option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: #667eea;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Progress Bar */
.progress-bar {
    height: 12px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Animations */
.pulse {
    animation: pulse 2s infinite;
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

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

.slide-in {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.bounce {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-12px); }
    60% { transform: translateY(-6px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Quiz Length Selection */
.quiz-length-option {
    transition: var(--transition);
    cursor: pointer;
}

.quiz-length-option > div {
    transition: var(--transition);
    border: 2px solid transparent;
}

.quiz-length-option:hover > div {
    transform: translateY(-5px) scale(1.05);
    border-color: #667eea;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.quiz-length-option.active > div {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
}

/* Leaderboard Styles */
.leaderboard-item {
    transition: var(--transition);
    border: 2px solid transparent;
}

.leaderboard-item:hover {
    transform: translateX(8px);
    border-color: #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFED4E 100%);
    border-color: #FFD700 !important;
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #E8E8E8 100%);
    border-color: #C0C0C0 !important;
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #E89B53 100%);
    border-color: #CD7F32 !important;
}

/* Feature Cards */
.feature-card {
    transition: var(--transition);
    padding: 30px 20px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* AdSense Styles */
.ad-container {
    text-align: center;
}

/* Specific ad placements */
.header-ad {
    margin-top: 0;
    margin-bottom: 30px;
}

.after-header-ad {
    margin: 40px auto;
}

.in-content-ad-1 {
    margin: 50px auto;
}

.sidebar-ad {
    position: sticky;
    top: 100px;
}

.quiz-ad {
    margin: 20px auto;
}

.results-ad-1 {
    margin: 30px auto;
}

.footer-ad {
    margin-top: 50px;
    margin-bottom: 0;
}

/* Form Elements */
input[type="text"] {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

/* Typography */
h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    color:white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Mobile Optimizations */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .screen {
        padding: 15px 0;
    }
    
    .card {
        margin: 10px;
        border-radius: 15px;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
    
    .option-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .ad-container {
        margin: 20px auto;
        padding: 15px;
    }
    
    .sidebar-ad {
        position: static;
        margin: 20px auto;
    }
    
    .feature-card {
        padding: 20px 15px;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .screen {
        padding: 10px 0;
    }
    
    .card {
        margin: 5px;
        border-radius: 12px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .option-card {
        padding: 14px;
        margin-bottom: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    input[type="text"] {
        padding: 16px;
        font-size: 0.95rem;
    }
    
    .ad-container {
        margin: 15px auto;
    }
}

/* Utility Classes */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-lg {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--primary-gradient) border-box;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gradient);
}

/* Focus States for Accessibility */
.btn:focus,
.option-card:focus,
input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Friendship Dare Section Specific Styles */
.friendship-section {
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .friendship-section {
        margin-bottom: 2rem;
    }
}

/* Feature Grid Improvements */
.feature-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Keyword Badges */
.keyword-badge {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.keyword-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    color: white;
    margin: 2rem 0;
}

/* Mobile Optimizations for the Section */
@media (max-width: 640px) {
    .friendship-section .card {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .keyword-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .cta-banner {
        padding: 1.5rem;
        margin: 1.5rem 0.5rem;
    }
}

/* Smooth Transitions */
.friendship-feature {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.friendship-feature:hover {
    transform: translateY(-5px);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}