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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Giriş Ekranı */
.login-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease;
}

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

.login-container h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.lobby-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lobby-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.lobby-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffd700;
    word-break: break-all;
}

/* Form Stilleri */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 20px;
    animation: shake 0.3s ease;
}

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

.nickname-rules {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 10px;
    line-height: 1.6;
}

/* Buton Stilleri */
.btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.4);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-start {
    background: linear-gradient(45deg, #00c853, #00e676);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
    margin-top: 20px;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 200, 83, 0.4);
}

/* Lobi Ekranı */
.lobby-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

.lobby-container h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lobby-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.teams-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.team {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    min-height: 200px;
}

.blue-team {
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.1));
}

.red-team {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.1));
}

.team h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.team-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.player-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.player-item.me {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.player-icon {
    font-size: 1.2rem;
}

.player-name {
    font-weight: 500;
}

.player-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

.you-badge {
    background: #ffd700;
    color: #1a1a2e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.ai-player {
    opacity: 0.7;
    font-style: italic;
}

.waiting-msg {
    text-align: center;
    padding: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    animation: pulse 2s infinite;
}

.character-select-section {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.section-label {
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.character-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.character-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 0, 0.45);
    background: rgba(255, 255, 255, 0.08);
}

.character-card.selected {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
    box-shadow: 0 12px 24px rgba(255, 215, 0, 0.12);
}

.character-card-icon {
    font-size: 2rem;
}

.character-card-name {
    font-size: 1rem;
    font-weight: 700;
}

.character-card-class {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.68);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Geri Sayım */
.countdown-number {
    font-size: 8rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
    animation: countdownPulse 0.5s ease;
}

@keyframes countdownPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Oyun Ekranı */
#game-screen {
    padding: 0;
}

#game-canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

/* Responsive */
@media (max-width: 600px) {
    .login-container {
        padding: 30px 20px;
    }
    
    .login-container h1 {
        font-size: 2rem;
    }
    
    .teams-container {
        grid-template-columns: 1fr;
    }

    .character-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .countdown-number {
        font-size: 5rem;
    }
}
