/* Diplomat Quiz Page Styles */

/* Hero Section */
.quiz-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at top left, rgba(220, 20, 60, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(178, 34, 34, 0.02) 0%, transparent 50%),
        linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    padding: 8rem 0 4rem;
}

.quiz-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.quiz-floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.quiz-shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220, 20, 60, 0.08) 0%, transparent 70%);
    filter: blur(40px);
    animation: floatShape 20s ease-in-out infinite;
}

.quiz-shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.quiz-shape-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: 15%;
    animation-delay: -7s;
}

.quiz-shape-3 {
    width: 250px;
    height: 250px;
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes floatShape {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 30px) scale(0.9);
    }
    75% {
        transform: translate(30px, 50px) scale(1.05);
    }
}

.quiz-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.quiz-hero-number {
    font-size: 8rem;
    font-weight: 900;
    color: rgba(220, 20, 60, 0.1);
    line-height: 1;
    margin-bottom: -2rem;
    letter-spacing: -0.05em;
}

.quiz-hero-title {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--primary-red) 0%, rgba(178, 34, 34, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-light);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Nickname Section */
.quiz-nickname-section {
    position: relative;
    padding: 6rem 0;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
    overflow: hidden;
}

.quiz-nickname-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.quiz-nickname-header {
    text-align: center;
    margin-bottom: 3rem;
}

.quiz-nickname-label {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.quiz-nickname-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.quiz-nickname-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
}

.quiz-nickname-form-wrapper {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 250, 0.98) 100%);
    border: 2px solid rgba(220, 20, 60, 0.15);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.9);
}

.quiz-nickname-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quiz-nickname-input {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid rgba(220, 20, 60, 0.2);
    border-radius: 16px;
    font-size: 1.1rem;
    font-family: inherit;
    color: var(--text-dark);
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.quiz-nickname-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(220, 20, 60, 0.1);
}

.quiz-nickname-input::placeholder {
    color: var(--text-light);
    opacity: 0.6;
}

.quiz-nickname-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-red) 0%, rgba(178, 34, 34, 0.9) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 8px 25px rgba(220, 20, 60, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quiz-nickname-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 35px rgba(220, 20, 60, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.quiz-nickname-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.quiz-nickname-message {
    display: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
}

.quiz-nickname-message.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(56, 142, 60, 0.1) 100%);
    color: #2e7d32;
    border: 2px solid rgba(76, 175, 80, 0.3);
}

.quiz-nickname-message.error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1) 0%, rgba(198, 40, 40, 0.1) 100%);
    color: #c62828;
    border: 2px solid rgba(244, 67, 54, 0.3);
}

/* Quiz Section */
.quiz-section {
    position: relative;
    padding: 6rem 0;
    background: 
        radial-gradient(ellipse at top right, rgba(220, 20, 60, 0.03) 0%, transparent 50%),
        linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    overflow: hidden;
}

.quiz-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.quiz-progress {
    flex: 1;
}

.quiz-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(220, 20, 60, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red) 0%, #FF1744 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 10%;
}

.quiz-progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

.quiz-score {
    text-align: right;
}

.quiz-score-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.quiz-score-value {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-red);
    line-height: 1;
}

.quiz-question-wrapper {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 250, 0.98) 100%);
    border: 2px solid rgba(220, 20, 60, 0.15);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.9);
}

.quiz-question {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.quiz-question-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option {
    padding: 1.2rem 1.5rem;
    border: 2px solid rgba(220, 20, 60, 0.2);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--text-dark);
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--primary-red);
    background: rgba(220, 20, 60, 0.05);
    transform: translateX(5px);
}

.quiz-option.selected {
    border-color: var(--primary-red);
    background: rgba(220, 20, 60, 0.1);
}

.quiz-option.correct {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.quiz-option.incorrect {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.quiz-next-btn {
    align-self: flex-end;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-red) 0%, rgba(178, 34, 34, 0.9) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

.quiz-next-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
}

.quiz-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Section */
.quiz-results-section {
    position: relative;
    padding: 6rem 0;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
    overflow: hidden;
}

.quiz-results-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.quiz-results-header {
    margin-bottom: 3rem;
}

.quiz-results-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.quiz-results-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.quiz-results-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
}

.quiz-results-score {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 250, 0.98) 100%);
    border: 2px solid rgba(220, 20, 60, 0.15);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.9);
}

.quiz-results-score-value {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-red);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.quiz-results-score-label {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.quiz-results-score-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.quiz-results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.quiz-share-btn,
.quiz-retry-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-share-btn {
    background: linear-gradient(135deg, #E1306C 0%, #C13584 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.3);
}

.quiz-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 48, 108, 0.4);
}

.quiz-retry-btn {
    background: linear-gradient(135deg, var(--primary-red) 0%, rgba(178, 34, 34, 0.9) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

.quiz-retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
}

.quiz-results-message {
    display: none;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin-top: 1.5rem;
    animation: slideDown 0.3s ease;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-results-message.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(56, 142, 60, 0.1) 100%);
    color: #2e7d32;
    border: 2px solid rgba(76, 175, 80, 0.3);
}

/* Leaderboard Section */
.quiz-leaderboard-section {
    position: relative;
    padding: 6rem 0;
    background: 
        radial-gradient(ellipse at top right, rgba(220, 20, 60, 0.03) 0%, transparent 50%),
        linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    overflow: hidden;
}

.quiz-leaderboard-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.quiz-leaderboard-header {
    text-align: center;
    margin-bottom: 4rem;
}

.quiz-leaderboard-label {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.quiz-leaderboard-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.quiz-leaderboard-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
}

.quiz-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-leaderboard-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 250, 0.98) 100%);
    border: 2px solid rgba(220, 20, 60, 0.15);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 
        0 5px 20px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.quiz-leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 30px rgba(220, 20, 60, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.9);
    border-color: rgba(220, 20, 60, 0.3);
}

.quiz-leaderboard-item.top-3 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border-color: rgba(255, 193, 7, 0.3);
}

.quiz-leaderboard-rank {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-red);
    min-width: 3rem;
    text-align: center;
}

.quiz-leaderboard-item.top-3 .quiz-leaderboard-rank {
    color: #FFC107;
}

.quiz-leaderboard-info {
    flex: 1;
}

.quiz-leaderboard-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.quiz-leaderboard-score {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-red);
}

.quiz-leaderboard-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.quiz-leaderboard-empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.quiz-leaderboard-empty h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.quiz-leaderboard-empty p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.7;
}

.quiz-loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.quiz-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(220, 20, 60, 0.1);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-hero {
        padding: 6rem 0 3rem;
        min-height: 80vh;
    }

    .quiz-nickname-section,
    .quiz-section,
    .quiz-results-section,
    .quiz-leaderboard-section {
        padding: 4rem 0;
    }

    .quiz-nickname-form-wrapper,
    .quiz-question-wrapper,
    .quiz-results-score {
        padding: 2rem 1.5rem;
    }

    .quiz-header {
        flex-direction: column;
        align-items: stretch;
    }

    .quiz-results-actions {
        flex-direction: column;
    }

    .quiz-share-btn,
    .quiz-retry-btn {
        width: 100%;
    }
}

