/* Pink Girly Math Quiz Stylesheet */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #ffe0f0 50%, #ffd4eb 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(255, 105, 180, 0.3);
    max-width: 600px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
    position: relative;
    z-index: 10;
}

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

.row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.number, .op, .equals, .answer {
    font-size: 48px;
    font-weight: bold;
    color: #ff69b4;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.2);
}

.op {
    color: #ff1493;
    font-size: 56px;
}

.equals {
    color: #ff85c1;
}

input[type="text"] {
    font-size: 48px;
    font-weight: bold;
    color: #ff69b4;
    text-align: center;
    border: 3px solid #ffb6d9;
    border-radius: 15px;
    padding: 15px 25px;
    width: 150px;
    background: #fff5fb;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus {
    border-color: #ff69b4;
    background: white;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.3);
    transform: scale(1.05);
}

button {
    font-size: 24px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    border: none;
    border-radius: 20px;
    padding: 18px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 10px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.5);
    animation: buttonWobble 0.3s ease-in-out;
}

button:active {
    transform: translateY(-1px) scale(0.95);
    box-shadow: 0 3px 10px rgba(255, 105, 180, 0.4);
    animation: buttonSquash 0.15s ease-out;
}

@keyframes buttonWobble {
    0%, 100% {
        transform: translateY(-3px) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(-1deg);
    }
    75% {
        transform: translateY(-3px) rotate(1deg);
    }
}

@keyframes buttonSquash {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(0.98);
    }
}

.correct {
    font-size: 36px;
    font-weight: bold;
    color: #ff69b4;
    background: linear-gradient(135deg, #ffe0f0 0%, #ffd4eb 100%);
    padding: 20px 40px;
    border-radius: 20px;
    border: 3px solid #ff69b4;
    animation: correctGlow 0.28s ease;
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.6);
}

.correct::before {
    content: "✨ ";
}

.correct::after {
    content: " ✨";
}

.wrong {
    font-size: 36px;
    font-weight: bold;
    color: #ff1493;
    background: #fff5fb;
    padding: 20px 40px;
    border-radius: 20px;
    border: 3px solid #ff85c1;
    animation: shake 0.28s ease;
}

.wrong::before {
    content: "💭 ";
}

.wrong::after {
    content: " 💭";
}

.info {
    font-size: 24px;
    font-weight: 500;
    color: #ff69b4;
    background: #fff5fb;
    padding: 15px 30px;
    border-radius: 15px;
    border: 2px solid #ffb6d9;
    text-align: center;
}

.result-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 20px;
    margin-top: 10px;
    animation: fadeIn 0.5s ease-in;
}

.question-prompt {
    font-size: 2em;
    color: #ff69b4;
}

@keyframes correctGlow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 105, 180, 0);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 105, 180, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 105, 180, 0.6);
    }
}

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

/* Mascot and Decorations (Section 1.2) */

.mascot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.mascot {
    width: 120px;
    height: 120px;
    cursor: pointer;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 4px 8px rgba(255, 105, 180, 0.3));
}

.mascot:hover {
    transform: scale(1.05);
}

/* Mascot animations */
@keyframes mascot-wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-15deg);
    }
    75% {
        transform: rotate(15deg);
    }
}

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

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

.mascot-nod {
    animation: mascot-nod 0.4s ease-in-out;
}

@keyframes mascot-thumbsup {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.mascot-thumbsup {
    animation: mascot-thumbsup 0.3s ease-in-out;
}

@keyframes mascot-blink {
    0%, 45%, 55%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.mascot-blink {
    animation: mascot-blink 0.2s ease-in-out;
}

@keyframes mascot-sparkle {
    0% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1) drop-shadow(0 4px 8px rgba(255, 105, 180, 0.3));
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        filter: brightness(1.3) drop-shadow(0 0 20px rgba(255, 105, 180, 0.8));
    }
    100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1) drop-shadow(0 4px 8px rgba(255, 105, 180, 0.3));
    }
}

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

/* Decorations layer */
.decorations-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bg-decoration {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.3;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bg-decoration:hover {
    opacity: 0.6;
    transform: scale(1.1) rotate(5deg);
}

.decoration-1 {
    top: 10%;
    left: 10%;
    animation: float1 6s ease-in-out infinite;
}

.decoration-2 {
    top: 20%;
    right: 15%;
    animation: float2 7s ease-in-out infinite;
}

.decoration-3 {
    bottom: 30%;
    left: 15%;
    animation: float3 8s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(-5deg);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-18px) rotate(3deg);
    }
}

/* Click effects */
.click-effect {
    position: fixed;
    pointer-events: none;
    font-size: 32px;
    z-index: 1000;
    transform: translate(-50%, -50%);
}

@keyframes effect-sparkles {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

.effect-sparkles {
    animation: effect-sparkles 0.6s ease-out;
}

@keyframes effect-confetti {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -100%) scale(2) rotate(360deg);
    }
}

.effect-confetti {
    animation: effect-confetti 0.8s ease-out;
}

@keyframes effect-stars {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.3);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
}

.effect-stars {
    animation: effect-stars 0.5s ease-out;
}

/* Reduced motion support - respects user accessibility preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    button:hover {
        animation: none;
    }

    button:active {
        animation: none;
    }

    .correct {
        animation: none;
    }

    .wrong {
        animation: none;
    }

    .container {
        animation: none;
    }

    input[type="text"]:focus {
        transform: none;
    }

    button:hover {
        transform: translateY(-2px);
    }

    button:active {
        transform: translateY(0);
    }

    .mascot-wave,
    .mascot-nod,
    .mascot-thumbsup,
    .mascot-blink,
    .mascot-sparkle {
        animation: none;
    }

    .bg-decoration {
        animation: none;
    }

    .click-effect {
        animation: none;
        display: none;
    }
}

/* Tablet styles */
@media (max-width: 768px) {
    .container {
        padding: 30px;
        border-radius: 25px;
    }

    .number, .op, .equals, .answer {
        font-size: 40px;
    }

    .op {
        font-size: 48px;
    }

    input[type="text"] {
        font-size: 40px;
        width: 130px;
        padding: 12px 20px;
    }

    button {
        font-size: 22px;
        padding: 16px 35px;
    }

    .correct, .wrong {
        font-size: 30px;
        padding: 18px 35px;
    }

    .info {
        font-size: 22px;
        padding: 12px 25px;
    }

    .result-image {
        max-width: 250px;
    }
}

/* Mobile styles (iPhone and similar) */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 25px;
        border-radius: 20px;
    }

    .row {
        gap: 10px;
        margin-bottom: 20px;
    }

    .number, .op, .equals, .answer {
        font-size: 32px;
    }

    .op {
        font-size: 40px;
    }

    input[type="text"] {
        font-size: 32px;
        width: 110px;
        padding: 10px 15px;
        border-radius: 12px;
    }

    button {
        font-size: 20px;
        padding: 15px 30px;
        border-radius: 15px;
        width: 100%;
        max-width: 280px;
    }

    .correct, .wrong {
        font-size: 24px;
        padding: 15px 25px;
        border-radius: 15px;
    }

    .info {
        font-size: 18px;
        padding: 10px 20px;
    }

    .result-image {
        max-width: 200px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .number, .op, .equals, .answer {
        font-size: 28px;
    }

    .op {
        font-size: 36px;
    }

    input[type="text"] {
        font-size: 28px;
        width: 100px;
    }

    button {
        font-size: 18px;
        padding: 12px 25px;
    }

    .correct, .wrong {
        font-size: 20px;
        padding: 12px 20px;
    }

    .info {
        font-size: 16px;
        padding: 8px 15px;
    }

    .result-image {
        max-width: 150px;
    }
}
