:root {
    --primary: #FF6B6B;
    --primary-dark: #ee5253;
    --secondary: #48dbfb;
    --secondary-dark: #0abde3;
    --success: #1dd1a1;
    --danger: #ff6b6b;
    --warning: #feca57;
    --dark: #222f3e;
    --light: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-main: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* İçeriğin yukarıdan başlamasını sağlar */
    overflow-y: auto; /* Dikey kaydırmaya izin ver */
    overflow-x: hidden;
    position: relative;
}

/* Background animated shapes */
body::before, body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    filter: blur(80px);
}

body::before {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite alternate;
}

body::after {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation: float 10s ease-in-out infinite alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

#app-container {
    width: 100%;
    max-width: 800px;
    min-height: 600px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

/* Screens */
.screen {
    width: 100%;
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
    position: relative;
}

.screen.hidden {
    display: none;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
}

/* Typography */
h1.game-title {
    font-size: 4rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 50px;
    text-shadow: 2px 4px 10px rgba(0,0,0,0.3);
    line-height: 1.1;
}

h1.game-title span {
    color: var(--warning);
}

.screen-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 1px 2px 5px rgba(0,0,0,0.2);
}

.highlight {
    color: var(--warning);
    font-weight: 800;
}

/* Buttons */
button {
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    padding: 15px 40px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn {
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.primary-btn:active {
    transform: translateY(1px);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.4);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.action-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 250px;
}

/* Settings & Inputs */
.setting-item, .input-group {
    margin-bottom: 25px;
    width: 100%;
}

.setting-item label, .input-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--secondary);
}

.gmail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    background: white;
    color: #444;
    text-transform: none;
    font-size: 1.1rem;
}

select, input[type="text"] {
    width: 100%;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

select option {
    background: var(--dark);
    color: white;
}

select:focus, input[type="text"]:focus {
    border-color: var(--secondary);
    background: rgba(0,0,0,0.3);
}

.group-names {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

/* Checkboxes & Radios */
.checkbox-group, .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-group label, .radio-btn {
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
}

.checkbox-group label:hover, .radio-btn:hover {
    background: rgba(255,255,255,0.2);
}

.checkbox-group label:has(input:checked), .radio-btn:has(input:checked) {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--dark);
}

/* Game Header */
.game-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 30px;
    gap: 15px;
}

.game-header .glass-panel {
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    flex: 1;
}

#timer {
    font-size: 1.5rem;
    color: var(--warning);
    font-weight: 900;
    letter-spacing: 2px;
}

/* Game Board */
.game-board {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.question-header {
    width: 100%;
    text-align: right;
    margin-bottom: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.word-display {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 20px 0 40px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
    text-align: center;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.option-btn {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    padding: 20px;
    font-size: 1.2rem;
    border-radius: 16px;
    color: white;
    transition: all 0.2s ease;
    text-transform: none;
    font-weight: 600;
}

.option-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.option-btn.correct {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(29, 209, 161, 0.5);
}

.option-btn.wrong {
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    animation: shake 0.5s;
}

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

/* Feedback Area */
.feedback-area {
    margin-top: 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.5s;
}

.sentence-box {
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    width: 100%;
}

.example-sentence {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--secondary);
}

.sentence-translation {
    font-size: 1.1rem;
    color: #ccc;
    font-style: italic;
}

.mt-4 {
    margin-top: 20px;
}

.mb-4 {
    margin-bottom: 20px;
}

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

/* Leaderboard */
.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    border-left: 5px solid var(--secondary);
}

.leaderboard-item:nth-child(1) {
    background: rgba(254, 202, 87, 0.2);
    border-color: var(--warning);
    transform: scale(1.05);
}

/* Turn Summary & Mistakes */
.mistakes-section {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    max-height: 250px;
    overflow-y: auto;
}

.mistakes-section h4 {
    color: var(--danger);
    margin-bottom: 15px;
    text-align: center;
}

.wrong-words-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wrong-words-list li {
    background: rgba(255,255,255,0.1);
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--danger);
}

.wrong-word-en {
    font-weight: 700;
    font-size: 1.1rem;
}

.wrong-word-tr {
    color: #ccc;
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .game-header {
        flex-direction: column;
    }
    
    h1.game-title {
        font-size: 3rem;
    }
}
