/* Custom CSS for SoruBil.com */

/* Animasyonlar */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes countdown {
    0% {
        background-color: #10B981;
    }
    50% {
        background-color: #F59E0B;
    }
    100% {
        background-color: #EF4444;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Utility Classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.countdown-animation {
    animation: countdown 1s ease-in-out;
}

.animate-slideDown {
    animation: slideDown 0.5s ease-out forwards;
}

.animate-bounce {
    animation: bounce 0.6s ease-in-out;
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.3s ease-out;
}

.active\:scale-98:active {
    transform: scale(0.98);
}

/* Quiz Interface */
.quiz-container {
    min-height: 70vh;
}

.question-card {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.question-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.answer-option {
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.answer-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #3B82F6;
}

.answer-option.selected {
    border-color: #3B82F6;
    background-color: #EBF8FF;
}

.answer-option.correct {
    border-color: #10B981;
    background-color: #ECFDF5;
}

.answer-option.incorrect {
    border-color: #EF4444;
    background-color: #FEF2F2;
}

/* Timer */
.timer-container {
    position: relative;
    display: inline-block;
}

.timer-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    position: relative;
    overflow: hidden;
}

.timer-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        #10B981 0deg,
        #10B981 var(--progress, 0deg),
        #E5E7EB var(--progress, 0deg),
        #E5E7EB 360deg
    );
}

.timer-text {
    position: relative;
    z-index: 10;
}

/* Joker Buttons */
.joker-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.joker-button:hover {
    transform: scale(1.05);
}

.joker-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.joker-button.used {
    background-color: #6B7280;
    color: #9CA3AF;
}

/* Leaderboard */
.leaderboard-item {
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.leaderboard-position {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.position-1 { background: linear-gradient(135deg, #FFD700, #FFA500); }
.position-2 { background: linear-gradient(135deg, #C0C0C0, #A8A8A8); }
.position-3 { background: linear-gradient(135deg, #CD7F32, #A0522D); }
.position-other { background: linear-gradient(135deg, #6B7280, #4B5563); }

/* Statistics Cards */
.stat-card {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

/* Progress Bars */
.progress-bar {
    height: 8px;
    background-color: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981, #059669);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #3B82F6;
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 1rem;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3B82F6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 300px;
    padding: 1rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease-out;
}

.toast.success { background-color: #10B981; }
.toast.error { background-color: #EF4444; }
.toast.warning { background-color: #F59E0B; }
.toast.info { background-color: #06B6D4; }

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Form Styling */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #E5E7EB;
}

.form-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-input.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .timer-circle {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .stat-card .stat-number {
        font-size: 2rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .answer-option {
        border-width: 3px;
    }
    
    .answer-option:hover {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Selection */
::selection {
    background-color: #3B82F6;
    color: white;
}

::-moz-selection {
    background-color: #3B82F6;
    color: white;
}
