:root {
    --primary-color: #FF69B4;
    --secondary-color: #9B59B6;
    --background-color: #F0F8FF;
    --clock-face-color: #FFF;
    --hand-color: #4A4A4A;
}

body {
    margin: 0;
    padding: 0.5rem;
    font-family: 'Comic Neue', cursive;
    background: var(--background-color);
    background-image: linear-gradient(45deg, #FFB6C1 25%, transparent 25%),
                      linear-gradient(-45deg, #FFB6C1 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #FFB6C1 75%),
                      linear-gradient(-45deg, transparent 75%, #FFB6C1 75%);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 95%;
    max-width: 90vw;
    margin: 0 auto;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

h1 {
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin: 0.3em 0;
}

.mode-selector {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mode-button {
    background: var(--primary-color);
    border: none;
    border-radius: 25px;
    padding: 0.6em 1.2em;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
    font-family: 'Comic Neue', cursive;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.clock, .quiz-clock {
    width: min(80vw, 250px);
    height: auto;
    aspect-ratio: 1;
    margin: 0.5rem auto;
    position: relative;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1),
                inset 0 0 50px rgba(155, 89, 182, 0.2);
}

.quiz-options {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.3rem;
}

.quiz-option {
    width: 100%;
    padding: 0.6rem;
    border-radius: 15px;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    min-height: 2.5rem;
}

.option-number {
    width: clamp(1.5rem, 4vw, 2rem);
    height: clamp(1.5rem, 4vw, 2rem);
    font-size: clamp(0.8rem, 2.5vw, 1rem);
}

.option-text {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

.option-decoration {
    position: absolute;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quiz-option:hover .option-decoration {
    opacity: 1;
}

.star, .heart {
    font-size: 1.2em;
    animation: float 2s ease-in-out infinite;
}

.heart {
    animation-delay: 0.5s;
}

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

/* Regnbågseffekt när alternativet är highlightat */
.quiz-option.highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        #ff69b4,
        #da70d6,
        #9370db,
        #ff69b4
    );
    animation: rainbow-spin 3s linear infinite;
    opacity: 0.3;
    z-index: 1;
}

@keyframes rainbow-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.quiz-feedback {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.feedback-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    animation: pop-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes pop-in {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.hidden {
    display: none !important;
}

.next-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 10px 20px;
    font-size: 1.1em;
    cursor: pointer;
    font-family: 'Comic Neue', cursive;
    transition: transform 0.2s;
}

.next-button:hover {
    transform: scale(1.05);
}

.number {
    position: absolute;
    font-size: calc(min(80vw, 250px) * 0.08);
    font-weight: bold;
    width: calc(min(80vw, 250px) * 0.1);
    height: calc(min(80vw, 250px) * 0.1);
    line-height: calc(min(80vw, 250px) * 0.1);
    text-align: center;
    transform: translate(-50%, -50%);
    color: var(--hand-color);
}

@media (min-width: 600px) {
    body {
        padding: 1rem;
    }

    .mode-selector {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }

    .quiz-options {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 0.8rem;
        padding: 0.5rem;
    }

    .clock, .quiz-clock {
        width: min(50vw, 300px);
    }

    .number {
        font-size: calc(min(50vw, 300px) * 0.08);
        width: calc(min(50vw, 300px) * 0.1);
        height: calc(min(50vw, 300px) * 0.1);
        line-height: calc(min(50vw, 300px) * 0.1);
    }

    .container {
        max-width: 80vw;
        padding: 1rem;
    }
}

.clock-face {
    width: 100%;
    height: 100%;
    position: relative;
    background: var(--clock-face-color);
    border-radius: 50%;
    border: 2px solid var(--hand-color);
}

.hand {
    width: 50%;
    height: 6px;
    background: var(--hand-color);
    position: absolute;
    top: 50%;
    right: 50%;
    transform-origin: 100% 50%;
    transform: rotate(0deg);
    transition: all 0.05s;
    transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1);
    border-radius: 3px;
    z-index: 2;
}

.hour-hand {
    width: 35%;
    height: 8px;
    right: 50%;
}

.minute-hand {
    width: 45%;
    height: 4px;
    right: 50%;
}

.center-dot {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 3;
    border: 2px solid var(--hand-color);
}

.quiz-option {
    background: linear-gradient(135deg, #fff6f8 0%, #ffffff 100%);
    padding: 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-option:hover {
    transform: scale(1.05) translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.3);
}

.quiz-option.highlight {
    background: linear-gradient(135deg, #ff69b4 0%, #da70d6 100%);
    color: white;
    transform: scale(1.1);
    border-color: white;
    box-shadow: 0 0 30px rgba(255, 105, 180, 0.5);
}

.option-content {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

.option-number {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.time-input {
    margin: 0.8rem 0;
}

.time-input input {
    width: clamp(40px, 15vw, 60px);
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    text-align: center;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 0.3rem;
    margin: 0 0.3rem;
}

.set-time-button {
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 10px 20px;
    font-size: 1.1em;
    cursor: pointer;
    margin-left: 10px;
    font-family: 'Comic Neue', cursive;
}

.difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 400px;
    margin: 20px auto;
}

.difficulty-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    box-shadow: 5px 5px 10px #d9d9d9, -5px -5px 10px #ffffff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.difficulty-button:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 12px #d9d9d9, -6px -6px 12px #ffffff;
}

.difficulty-button:active {
    transform: translateY(1px);
    box-shadow: 3px 3px 6px #d9d9d9, -3px -3px 6px #ffffff;
}

.difficulty-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.difficulty-clock {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    justify-content: center;
    align-items: center;
}

.sample-time {
    font-size: 2em;
    color: #333;
    animation: float 2s ease-in-out infinite;
}

.sample-time:nth-child(2) {
    animation-delay: 0.5s;
}

.sample-time:nth-child(3) {
    animation-delay: 1s;
}

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

.difficulty-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-top: 5px;
}

.difficulty-button.easy {
    background: linear-gradient(145deg, #e8f5e9, #c8e6c9);
}

.difficulty-button.medium {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
}

.difficulty-button.hard {
    background: linear-gradient(145deg, #fff3e0, #ffe0b2);
} 