:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6584;
    --accent-color: #43D9AD;
    --background-color: #F0F2F5;
    --card-bg: #FFFFFF;
    --text-color: #2D3436;
    --font-family: 'Outfit', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.primary-btn,
.secondary-btn,
.success-btn,
.danger-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-family);
    font-weight: bold;
    margin: 10px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.secondary-btn {
    background-color: #A0A0A0;
    color: white;
}

.success-btn {
    background-color: var(--accent-color);
    color: white;
}

.danger-btn {
    background-color: var(--secondary-color);
    color: white;
}

.primary-btn:hover,
.secondary-btn:hover,
.success-btn:hover,
.danger-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.group-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.group-card:hover {
    transform: translateY(-5px);
}

.group-card h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-top: 0;
}

.group-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.group-card li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
}

/* Game Page */
.score-board {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    font-weight: bold;
    font-size: 1.2rem;
}

.game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

@media (min-width: 768px) {
    .game-content {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }
}

.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    color: var(--secondary-color);
    z-index: 10;
}

#spin-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.question-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
}

#current-player-display {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

#player-name {
    color: var(--primary-color);
    font-weight: bold;
}

.card-container {
    perspective: 1000px;
    width: 300px;
    height: 300px;
    margin-bottom: 20px;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card.flipped {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    background: white;
}

.card-front {
    font-size: 2rem;
    color: #ccc;
}

.card-back {
    transform: rotateY(180deg);
}

#word-image {
    max-width: 80%;
    max-height: 70%;
    object-fit: contain;
    border-radius: 10px;
}

#word-text {
    font-size: 1.5rem;
    margin-top: 15px;
    font-weight: bold;
    color: var(--text-color);
}

/* Spelling Game Styles */
#spelling-game-page {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.spelling-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.image-display img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 10px;
}

.word-display {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    min-height: 60px;
}

.letter-slot {
    width: 50px;
    height: 60px;
    border-bottom: 4px solid var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-transform: uppercase;
}

.letter-slot.filled {
    border-bottom-color: var(--accent-color);
    color: var(--primary-color);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Custom Keyboard */
.keyboard-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 700px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 30px;
}

.key {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.key:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* Pink and Blue Theme */
.key:nth-child(odd) {
    background-color: #FFB7C5;
    /* Tos Pembe (Dusty Pinkish) */
    color: #fff;
}

.key:nth-child(even) {
    background-color: #89CFF0;
    /* Bebek Mavisi (Baby Blue) */
    color: #fff;
}

/* Popups */
#popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.popup-image {
    position: absolute;
    width: 150px;
    height: auto;
    animation: floatUp 1.5s ease-out forwards;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0.5) rotate(0deg);
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-20vh) scale(1.2) rotate(20deg);
        opacity: 0;
    }
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-10px);
    }

    40% {
        transform: translateX(10px);
    }

    60% {
        transform: translateX(-10px);
    }

    80% {
        transform: translateX(10px);
    }

    100% {
        transform: translateX(0);
    }
}

.letter-slot.space-slot {
    /* Boşluk slotları için ekstra stil (isteğe bağlı) */
    border-bottom: none;
    color: transparent;
}

/* Renkli Başlık Stilleri */
.colorful-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    text-transform: uppercase;
}

.letter {
    display: inline-block;
    animation: bounce 2s infinite;
}

/* Harflerin hafifçe zıplama efekti */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.colorful-title {
    font-size: 3rem;
    font-weight: 900;
    margin-top: 50px;
    /* Üstteki butonlardan mesafe açar */
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    text-transform: uppercase;
    max-width: 800px;
    /* Genişliği kısıtlayarak iki satıra zorlar */
    margin-left: auto;
    margin-right: auto;
}

.letter {
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}