/**
 * Kur'an-ı Kerim Tefsir Uygulaması
 * Custom CSS Styles
 */

/* Font Family */
.font-sans {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.font-arabic {
    font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade', serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

/* Safe Area for iOS */
.h-safe-area-bottom {
    height: env(safe-area-inset-bottom, 0);
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slideUp {
    animation: slideUp 0.4s ease-out;
}

/* Arabic Text Styling */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

.text-arabic {
    line-height: 2.2;
    letter-spacing: 0.02em;
}

/* Glass Effect */
.glass {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #10b981, #14b8a6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.1);
}

/* Button Effects */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn-glow:active::before {
    width: 200px;
    height: 200px;
}

/* Mobile Touch Feedback */
@media (hover: none) {
    .active\:scale-95:active {
        transform: scale(0.95);
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    .text-arabic {
        font-size: 1.5rem;
        line-height: 2;
    }
}

/* PWA App Feel */
body {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

/* Allow text selection for reading */
p, h1, h2, h3, span {
    -webkit-user-select: text;
    user-select: text;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Focus States */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.5);
    outline-offset: 2px;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(51, 65, 85, 0.3) 25%,
        rgba(51, 65, 85, 0.5) 50%,
        rgba(51, 65, 85, 0.3) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Verse Card */
.verse-card {
    position: relative;
    overflow: hidden;
}

.verse-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.verse-card:hover::before {
    opacity: 1;
}

/* Audio Playing Indicator */
.audio-playing {
    position: relative;
}

.audio-playing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: audioPulse 1s ease-out infinite;
}

@keyframes audioPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Bottom Nav Shadow */
nav {
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

/* Header Blur */
header {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}
