/* Fatiha 19 Kodu Test Sayfası - Özel Stiller */

/* Arapça metin için özel font ve stillendirme */
#inputText {
    font-family: 'Scheherazade New', 'Traditional Arabic', 'Amiri', serif !important;
    font-size: 1.5rem;
    line-height: 2;
    text-align: right;
    direction: rtl;
}

/* Textarea için özel odaklanma efekti */
#inputText:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: scale(1.01);
}

/* Yükleme durumu için animasyon */
.loading-spinner {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
}

.loading-spinner:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Test sonuç tablosu için özel stiller */
#resultsBody tr {
    transition: all 0.3s ease;
}

#resultsBody tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: scale(1.01);
}

.dark #resultsBody tr:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Test sonuç durum ikonları */
.test-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.test-failure {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Başarı oranı çemberi için özel animasyon */
#passRateCircle svg {
    transform: rotate(-90deg);
    animation: circleReveal 2s ease-out;
}

@keyframes circleReveal {
    0% {
        stroke-dasharray: 0, 100;
    }
    100% {
        stroke-dasharray: var(--progress), 100;
    }
}

/* Değişiklik durumu göstergesi */
#changeIndicator {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

#changeIndicator.changed {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

#changeIndicator.unchanged {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border-color: #d1d5db;
}

.dark #changeIndicator.unchanged {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
    border-color: #4b5563;
}

/* Buton hover efektleri */
#analyzeBtn, #resetBtn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#analyzeBtn:before, #resetBtn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#analyzeBtn:hover:before, #resetBtn:hover:before {
    left: 100%;
}

/* Test kuralları listesi için özel stil */
.test-rules-list {
    counter-reset: test-counter;
}

.test-rules-list .test-rule {
    counter-increment: test-counter;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
}

.test-rules-list .test-rule:before {
    content: counter(test-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Responsive tasarım iyileştirmeleri */
@media (max-width: 768px) {
    #inputText {
        font-size: 1.25rem;
        line-height: 1.8;
    }
    
    .grid-cols-2.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lg\\:col-span-2 {
        grid-column: span 1;
    }
}

/* Test sonuçları için sayı formatı */
.number-display {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

/* Matematiksel formül gösterimi */
.math-formula {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    display: inline-block;
    margin: 0.25rem;
}

.dark .math-formula {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #e0e7ff;
}

/* Sonuç açıklaması için özel stiller */
.result-explanation {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border-left: 4px solid #10b981;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
}

.dark .result-explanation {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border-left-color: #34d399;
}

.result-explanation.failure {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    border-left-color: #ef4444;
}

.dark .result-explanation.failure {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    border-left-color: #f87171;
}

/* Animasyonlu geçişler */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Özel scrollbar için stiller */
#inputText::-webkit-scrollbar {
    width: 8px;
}

#inputText::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

#inputText::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#inputText::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

.dark #inputText::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.dark #inputText::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.dark #inputText::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Test sonuçları tablosu için zebra efekti - koyu tema için düzeltme */
#resultsBody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Koyu tema için zebra efekti kaldırıldı - düz koyu renk */
.dark #resultsBody tr:nth-child(even) {
    background-color: #374151;
}

.dark #resultsBody tr:nth-child(odd) {
    background-color: #374151;
}

/* Vurgulama efekti */
.highlight-pulse {
    animation: highlightPulse 2s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
}

/* İpucu kartları için özel stiller */
.tip-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dark .tip-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}
