/* ilkson.css - İLK-SON OYUN TASARIMI */

.ilkson-game { --gap: 10px; --radius: 10px; }
.ilkson-game * { box-sizing: border-box; }

.ilkson-game .wrap {
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.ilkson-game .area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.ilkson-game .game-begin-content {
    text-align: center;
}

.ilkson-game .game-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 450px;
}

/* Sohbet Alanı */
.ilkson-game .chat-container {
    flex: 1;
    background: #f8fafc;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 350px;
    min-height: 350px;
    position: relative;
}

/* Chat İçi Loading */
.ilkson-game .chat-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 10;
}

.ilkson-game .chat-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ilkson-game .chat-loading-text {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.ilkson-game .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

/* Scrollbar Stilleri */
.ilkson-game .chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ilkson-game .chat-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.ilkson-game .chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.ilkson-game .chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mesaj Stilleri */
.ilkson-game .chat-message {
    display: flex;
    animation: slideIn 0.3s ease;
}

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

.ilkson-game .system-message {
    justify-content: flex-start;
}

.ilkson-game .user-message {
    justify-content: flex-end;
}

.ilkson-game .message-content {
    padding: 12px 18px;
    border-radius: 20px;
    max-width: 70%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
}

.ilkson-game .system-message .message-content {
    background: #ccc;
    color: white;
    border-bottom-left-radius: 5px;
}

.ilkson-game .user-message .message-content {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.ilkson-game .word-text {
    letter-spacing: 2px;
}

.ilkson-game .last-letter {
    background: rgba(255,255,255,0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
}

/* Düşünüyor Animasyonu */
.ilkson-game .thinking {
    padding: 15px 25px;
}

.ilkson-game .thinking .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.ilkson-game .thinking .dot:nth-child(1) { animation-delay: -0.32s; }
.ilkson-game .thinking .dot:nth-child(2) { animation-delay: -0.16s; }
.ilkson-game .thinking .dot:nth-child(3) { animation-delay: 0; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Giriş Alanı */
.ilkson-game .chat-input-container {
    padding: 15px;
    background: white;
}

.ilkson-game .expected-letter-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #64748b;
}

/* Hata Mesajı Alanı */
.ilkson-game .error-message-area {
    min-height: 40px;
    margin-bottom: 8px;
    padding: 0 5px;
}

.ilkson-game .error-message {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    animation: shakeError 0.5s ease;
}

.ilkson-game .error-message i {
    font-size: 14px;
}

.ilkson-game .error-message.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fcd34d;
    color: #b45309;
}

.ilkson-game .error-message.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #6ee7b7;
    color: #059669;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Bekleme Ekranı */
.ilkson-game .break-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--radius);
}

.ilkson-game .break-content {
    text-align: center;
    color: white;
}

.ilkson-game .break-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.ilkson-game .break-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ilkson-game .break-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.ilkson-game .break-timer {
    font-size: 64px;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.ilkson-game .break-stats {
    margin-top: 20px;
    display: flex;
    gap: 30px;
}

.ilkson-game .break-stat {
    text-align: center;
}

.ilkson-game .break-stat-value {
    font-size: 28px;
    font-weight: 700;
}

.ilkson-game .break-stat-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
}

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

.ilkson-game .expected-letter {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
}

.ilkson-game .chat-input-wrapper {
    display: flex;
    gap: 10px;
}

.ilkson-game .chat-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    text-transform: lowercase;
}

.ilkson-game .chat-input:focus {
    border-color: #667eea;
}

.ilkson-game .chat-input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
}

.ilkson-game .send-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ilkson-game .send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.ilkson-game .send-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    .ilkson-game .message-content {
        max-width: 85%;
        font-size: 14px;
    }
}

