/* ===================================
   FIDE ID Sorgulama - Ana Stil Dosyası
   v2.1 - Modern & Premium Tasarım
   =================================== */

/* --- GENEL STILLER --- */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    background-image:
        linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(100, 0, 0, 0.3)),
        url('bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* --- ANA KUTU --- */
.box {
    background: rgba(255, 255, 255, 0.90);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 1000px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- BAŞLIK ALANI --- */
.header-area {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.accent-red {
    color: #dc2626;
}

/* --- BİLGİ KUTUSU --- */
.info-box {
    background: #f1f5f9;
    border-left: 5px solid #dc2626;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
}

/* --- TABLO KONTEYNER --- */
#spreadsheet-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid #e2e8f0;
}

/* --- BUTONLAR --- */
.btn-group {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

button {
    padding: 15px 35px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

#btnRun {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
}

#btnRun:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(220, 38, 38, 0.4);
}

#btnRun:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    filter: grayscale(1);
    transform: none;
}

#btnDown {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    color: white;
}

#btnDown:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(30, 41, 59, 0.4);
}

#btnClear:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(100, 116, 139, 0.4);
}

/* --- LOG ALANI --- */
#log {
    margin-top: 25px;
    text-align: center;
    font-weight: 600;
    color: #334155;
    min-height: 25px;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.8);
    padding: 5px;
    border-radius: 5px;
    display: inline-block;
}

/* --- TABLO STİLLERİ --- */
.jexcel > thead > tr > td {
    background-color: #1e293b !important;
    color: white !important;
    font-weight: 600;
}

/* --- CAPTCHA --- */
.captcha-area {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

/* --- İMLEÇ VE SEÇİM AYARLARI --- */
.box, .header-area, .info-box, .captcha-area, #log {
    user-select: none;
    cursor: default;
}

.jexcel {
    user-select: auto !important;
}

/* --- UNVAN SÜTUNU DÜZELTMESİ --- */
.jexcel tbody tr td.c2.readonly {
    color: inherit !important;
    opacity: 1 !important;
}

/* --- RATING DOĞRULAMA RENKLERİ --- */
/* Doğru rating - Yeşil */
.jexcel tbody tr td.c4.rating-match,
.jexcel tbody tr td.c5.rating-match,
.jexcel tbody tr td.c6.rating-match,
.jexcel tbody tr td.rating-match {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

/* Yanlış rating - Kırmızı */
.jexcel tbody tr td.c4.rating-mismatch,
.jexcel tbody tr td.c5.rating-mismatch,
.jexcel tbody tr td.c6.rating-mismatch,
.jexcel tbody tr td.rating-mismatch {
    background-color: #fecaca !important;
    color: #991b1b !important;
}

/* --- LOADING ANIMASYONU --- */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 10px;
}

.loading-subtext {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

/* ========================================
   MOBİL UYUMLULUK AYARLARI
   ======================================== */
@media screen and (max-width: 768px) {
    body {
        background-attachment: scroll;
        background-position: center top;
        padding: 10px;
    }

    .box {
        padding: 15px;
        width: 95%;
    }

    h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 5px;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    button {
        width: 100%;
        justify-content: center;
    }

    #spreadsheet-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .jexcel > thead > tr > td {
        font-size: 0.8rem;
    }

    .loading-text {
        font-size: 1rem;
    }

    .spinner {
        width: 50px;
        height: 50px;
    }
}
