/* ============================================
   GENERAL STYLES - Shared across all templates
   ============================================ */

   


/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Orbitron', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

.container {
    max-width: 900px;
    width: 90%;
    margin: 0 auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* Welcome Screen Structure */
.welcome-screen {
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-screen h1 {
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: 800;
}

.welcome-screen > p {
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Template Selector */
.template-selector {
    margin: 30px 0;
    padding: 25px;
    border-radius: 15px;
}

.template-selector h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 700;
}

.template-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.template-btn {
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    border: 2px solid;
}

.current-theme {
    font-size: 0.9em;
    margin: 0;
}

.current-theme strong {
    font-weight: 700;
}

/* Banks List */
.banks-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.bank-card {
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.bank-card h3 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

.bank-card p {
    margin-bottom: 15px;
}

.start-btn {
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Test Screen Structure */
.test-screen {
    backdrop-filter: blur(2px);
    border-radius: 20px;
    padding: 40px;
    animation: slideIn 0.5s ease-out;
}

.test-header {
    margin-bottom: 20px;
    display: none;
}

.progress-bar-container {
    margin-top: 30px;
    padding-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 10px,
            rgba(0, 0, 0, 0.1) 10px,
            rgba(0, 0, 0, 0.1) 14px
        ),
        linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 100%);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            transparent 0deg,
            rgba(255, 255, 255, 0.25) 8deg,
            transparent 16deg,
            rgba(0, 0, 0, 0.15) 24deg,
            transparent 32deg
        );
    background-size: 50px 50px;
    animation: spiralRotate 3s linear infinite;
    opacity: 1;
    pointer-events: none;
}

@keyframes spiralRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.progress-fill {
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            transparent 0deg,
            rgba(255, 255, 255, 0.4) 10deg,
            transparent 20deg,
            rgba(255, 255, 255, 0.3) 30deg,
            transparent 40deg
        );
    background-size: 45px 45px;
    animation: spiralRotate 2s linear infinite;
    opacity: 1;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent 0px,
            transparent 8px,
            rgba(255, 255, 255, 0.3) 8px,
            rgba(255, 255, 255, 0.3) 12px
        );
    background-size: 20px 20px;
    animation: diagonalMove 1s linear infinite;
    opacity: 0.9;
}

@keyframes diagonalMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 20px;
    }
}

.question-counter {
    font-size: 1em;
    text-align: right;
}

.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    position: relative;
}

.countdown-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border: 3px solid;
}

.countdown-circle.slide-out {
    animation: slideOutRight 0.5s ease-in-out forwards;
}

.countdown-circle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: countdownRotate 2s linear infinite reverse;
}

.countdown-circle span {
    color: white;
    font-size: 3em;
    font-weight: 900;
    position: relative;
    z-index: 1;
    animation: numberPop 0.5s ease;
}

@keyframes countdownRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes numberPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Question Section (Top) */
.question-section {
    margin: 20px 0;
    overflow: visible;
    position: relative;
}

.question-card {
    /* Cloud-like dream bubble shape */
    border-radius: 
        50% 40% 50% 40% / 60% 30% 70% 40%,
        40% 50% 40% 50% / 30% 60% 40% 70%,
        50% 50% 50% 50% / 50% 50% 50% 50%;
    padding: 30px;
    border: 2px solid;
    position: relative;
    margin-bottom: 50px;
    animation: dreamFloat 3s ease-in-out infinite;
    overflow: visible;
}

@keyframes dreamFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.3);
    }
    50% {
        opacity: 1;
        transform: translateY(0) scale(1.1);
    }
    70% {
        transform: translateY(-10px) scale(1);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.question-card.slide-out {
    animation: slideOutLeft 0.6s ease-in-out forwards;
}

.option-label.slide-out {
    animation: slideOutRight 0.6s ease-in-out forwards;
}

/* Ensure correct answer stays visible during display duration */
.option-label.correct {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

/* Prevent correct answer from disappearing before slide-out */
.option-label.correct:not(.slide-out) {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.option-label.slide-out:nth-child(1) {
    animation-delay: 0.1s;
}

.option-label.slide-out:nth-child(2) {
    animation-delay: 0.2s;
}

.option-label.slide-out:nth-child(3) {
    animation-delay: 0.3s;
}

.option-label.slide-out:nth-child(4) {
    animation-delay: 0.4s;
}

/* Slide-in animation classes */
.question-card.slide-in-left {
    animation: slideInFromLeft 0.6s ease-out forwards;
}

.question-card.slide-in-right {
    animation: slideInFromRight 0.6s ease-out forwards;
}

.question-card.slide-in-top {
    animation: slideInFromTop 0.6s ease-out forwards;
}

.question-card.slide-in-bottom {
    animation: slideInFromBottom 0.6s ease-out forwards;
}

.question-card.slide-in-fade {
    animation: fadeInScale 0.6s ease-out forwards;
}

.question-card.slide-in-rotate {
    animation: rotateIn 0.6s ease-out forwards;
}

.question-card.slide-in-bounce {
    animation: bounceIn 0.8s ease-out forwards;
}

.option-label.slide-in-left {
    animation: slideInFromLeft 0.5s ease-out forwards;
}

.option-label.slide-in-right {
    animation: slideInFromRight 0.5s ease-out forwards;
}

.option-label.slide-in-top {
    animation: slideInFromTop 0.5s ease-out forwards;
}

.option-label.slide-in-bottom {
    animation: slideInFromBottom 0.5s ease-out forwards;
}

.option-label.slide-in-fade {
    animation: fadeInScale 0.5s ease-out forwards;
}

.option-label.slide-in-rotate {
    animation: rotateIn 0.5s ease-out forwards;
}

.option-label.slide-in-bounce {
    animation: bounceIn 0.6s ease-out forwards;
}

.countdown-circle.slide-in-left {
    animation: slideInFromLeft 0.5s ease-out forwards;
}

.countdown-circle.slide-in-right {
    animation: slideInFromRight 0.5s ease-out forwards;
}

.countdown-circle.slide-in-top {
    animation: slideInFromTop 0.5s ease-out forwards;
}

.countdown-circle.slide-in-bottom {
    animation: slideInFromBottom 0.5s ease-out forwards;
}

.countdown-circle.slide-in-fade {
    animation: fadeInScale 0.5s ease-out forwards;
}

.countdown-circle.slide-in-rotate {
    animation: rotateIn 0.5s ease-out forwards;
}

.countdown-circle.slide-in-bounce {
    animation: bounceIn 0.6s ease-out forwards;
}

/* Thought bubble circles - first circle */
.question-card::before {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid;
    background: inherit;
    z-index: -1;
}

/* Thought bubble circles - second and third circles */
.question-card::after {
    content: '';
    position: absolute;
    bottom: -35px;
    left: 35px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid;
    background: inherit;
    z-index: -1;
    /* Third thought circle using box-shadow */
    box-shadow: 15px -8px 0 -2px currentColor;
}

.question-text {
    font-size: 1.6em;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
}

/* Options Container (Bottom) */
.options-container {
    margin: 30px 0;
}

.options-list {
    list-style: none;
}

.option-item {
    margin-bottom: 12px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    padding-left: 80px;
    border: 2px solid;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    min-height: 60px;
    gap: 20px;
}

.option-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

.option-letter {
    position: absolute;
    left: 20px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 900;
    font-size: 1.4em;
    color: white;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(255, 255, 255, 0.2);
    transform: perspective(100px) rotateX(5deg);
    transition: all 0.3s ease;
}

.option-label:hover .option-letter {
    transform: perspective(100px) rotateX(5deg) translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.4),
        0 3px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3);
}

.option-label.selected .option-letter,
.option-label.correct .option-letter {
    transform: perspective(100px) rotateX(5deg) scale(1.1);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.4);
}

.option-label.correct .option-letter {
    background: linear-gradient(135deg, #4caf50 0%, #65da6b 100%);
    box-shadow: 
        0 8px 16px rgba(76, 175, 80, 0.5),
        0 4px 8px rgba(76, 175, 80, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.4);
    transform: scale(1.02);
    animation: correctPulse 0.5s ease;
}

.option-text {
    display: block;
    font-weight: 700;
    line-height: 1.5;
    flex: 1;
    letter-spacing: 0.3px;
}

.option-label.selected {
    font-weight: 700;
}

.option-label.correct {
    transform: scale(1.02);
    animation: correctPulse 0.5s ease;
}

.option-label.correct .option-text {
    font-weight: 800;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1.02); }
}

/* Results Screen */
.results-screen {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
    background: radial-gradient(#000000, #0f0b0b5e);
    margin-top: 20px;
    border-radius: 50px;
}

.results-screen h2 {
    margin-bottom: 15px;
    font-size: 2.8em;
    font-weight: 900;
}

.subscribe-message {
    font-size: 1.6em;
    margin-bottom: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #FF5722 0%, #CDDC39 50%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 2s ease-in-out infinite;
}

.smiley-emoji {
    text-align: center;
    margin: 40px 0;
    animation: smileyBounce 2s ease-in-out infinite;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.smiley-emoji .logo-image {
    max-width: 300px;
    width: auto;
    height: auto;
    display: block;
    animation: smileyBounce 2s ease-in-out infinite;
}

@keyframes smileyBounce {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.1) translateY(-20px);
    }
}

.score-display {
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid;
    display: none; /* Hide score display */
}

.score-display p {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.score-display #scoreDisplay {
    font-size: 2em;
    font-weight: bold;
}

.percentage {
    font-size: 1.2em;
    margin-top: 10px;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Test Controls */
.test-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 10px;
}

/* Start Quiz Button - Fixed to bottom */
.start-quiz-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 20px 30px;
    font-size: 1.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 -8px 30px rgba(102, 126, 234, 0.5);
    }
}

.start-quiz-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 -10px 40px rgba(102, 126, 234, 0.6);
}

.start-quiz-btn:active {
    transform: scale(0.98);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }
    
    .container {
        max-width: 100%;
    }
    
    .welcome-screen, .test-screen {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .welcome-screen h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    
    .welcome-screen > p {
        font-size: 1em;
        margin-bottom: 20px;
    }
    
    .template-selector {
        padding: 15px;
        margin: 20px 0;
    }
    
    .template-selector h3 {
        font-size: 1em;
        margin-bottom: 10px;
    }
    
    .template-options {
        gap: 8px;
    }
    
    .template-btn {
        padding: 8px 15px;
        font-size: 0.8em;
    }
    
    .current-theme {
        font-size: 0.8em;
    }
    
    .banks-list {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
    }
    
    .bank-card {
        padding: 20px;
    }
    
    .bank-card h3 {
        font-size: 1.1em;
    }
    
    .start-btn {
        padding: 10px 25px;
        font-size: 0.9em;
    }
    
    .progress-bar-container {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .progress-bar {
        height: 12px;
    }
    
    .question-counter {
        font-size: 0.9em;
        text-align: center;
    }
    
    .countdown-container {
        margin: 20px 0;
    }
    
    .countdown-circle {
        width: 90px;
        height: 90px;
    }
    
    .countdown-circle span {
        font-size: 2.2em;
    }
    
    .question-section {
        margin: 15px 0;
    }
    
    .options-container {
        margin: 20px 0;
    }
    
    .question-card {
        padding: 20px 15px;
        margin-bottom: 40px;
    }
    
    .question-card::before {
        width: 16px;
        height: 16px;
        bottom: -20px;
        left: 15px;
    }
    
    .question-card::after {
        width: 12px;
        height: 12px;
        bottom: -28px;
        left: 28px;
    }
    
    .question-text {
        font-size: 1.1em;
        margin-bottom: 20px;
    }
    
    .option-label {
        padding: 18px 20px;
        padding-left: 70px;
        font-size: 1em;
        min-height: 55px;
    }
    
    .option-letter {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
        left: 15px;
    }
    
    .option-text {
        font-size: 1em;
    }
    
    .results-screen {
        padding: 15px;
    }
    
    .results-screen h2 {
        font-size: 2em;
        margin-bottom: 10px;
    }
    
    .subscribe-message {
        font-size: 1.2em;
        margin-bottom: 20px;
        letter-spacing: 1px;
    }
    
    .smiley-emoji {
        margin: 30px 0;
    }
    
    .smiley-emoji .logo-image {
        max-width: 200px;
    }
    
    .score-display {
        padding: 20px 15px;
        margin-bottom: 20px;
        display: none; /* Hide score display */
    }
    
    .score-display p {
        font-size: 1.2em;
    }
    
    .score-display #scoreDisplay {
        font-size: 1.6em;
    }
    
    .percentage {
        font-size: 1em;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.9em;
        width: 100%;
        margin-top: 10px;
    }
    
    .start-quiz-btn {
        padding: 18px 25px;
        font-size: 1.2em;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .welcome-screen, .test-screen {
        padding: 15px 10px;
    }
    
    .welcome-screen h1 {
        font-size: 1.5em;
    }
    
    .template-selector {
        padding: 12px;
    }
    
    .template-btn {
        padding: 6px 12px;
        font-size: 0.75em;
    }
    
    .countdown-circle {
        width: 80px;
        height: 80px;
    }
    
    .countdown-circle span {
        font-size: 2em;
    }
    
    .question-card {
        padding: 15px 12px;
        margin-bottom: 35px;
    }
    
    .question-card::before {
        width: 14px;
        height: 14px;
        bottom: -18px;
        left: 12px;
    }
    
    .question-card::after {
        width: 10px;
        height: 10px;
        bottom: -25px;
        left: 24px;
    }
    
    .question-text {
        font-size: 1.1em;
    }
    
    .options-container {
        margin: 15px 0;
    }
    
    .option-label {
        padding: 15px 18px;
        padding-left: 65px;
        font-size: 0.95em;
        min-height: 50px;
    }
    
    .option-letter {
        width: 35px;
        height: 35px;
        font-size: 1.1em;
        left: 12px;
    }
    
    .option-text {
        font-size: 0.95em;
    }
    
    .results-screen h2 {
        font-size: 1.6em;
    }
    
    .smiley-emoji {
        margin: 20px 0;
    }
    
    .smiley-emoji .logo-image {
        max-width: 150px;
    }
    
    .subscribe-message {
        font-size: 1em;
    }
    
    .start-quiz-btn {
        padding: 15px 20px;
        font-size: 1em;
        letter-spacing: 1px;
    }
}

