/* 
 * Açıkoylama - Özel Chill & Modern Stiller
 * Göz yormayan, ferah ve huzurlu açık renk paleti
 */

:root {
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-blue: #2563eb;
    --accent-blue-soft: #eff6ff;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* Mobil Dokunma İyileştirmeleri */
button, a, .poll-option-item {
    touch-action: manipulation;
}

/* Yatay kaydırma çubuğunu gizle & Akıcı dokunmatik kaydırma */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

/* YouTube Tarzı Anket Kartı Efektleri */
.poll-card, .admin-poll-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.poll-option-item {
    position: relative;
    user-select: none;
    transition: all 0.2s ease;
}

/* Yalnızca fare kullanan cihazlarda hover efekti (Mobilde yapışkan hover'ı engeller) */
@media (hover: hover) and (pointer: fine) {
    .poll-card:hover, .admin-poll-card:hover {
        transform: translateY(-2px);
    }
    .poll-option-item:hover:not(.voted) {
        border-color: #94a3b8;
        transform: translateY(-1px);
    }
}

/* Dokunmatik cihazlarda anlık dokunma geri bildirimi */
@media (hover: none) or (pointer: coarse) {
    .poll-option-item:active {
        transform: scale(0.99);
        background-color: #f8fafc;
    }
}

.poll-progress-bar {
    transition: width 0.75s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.35s ease, 
                background-color 0.3s ease !important;
    will-change: width, opacity;
}

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

.animate-scaleIn {
    animation: scaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 6 Haneli Doğrulama Kodu Kutuları */
.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.otp-box {
    width: 48px;
    height: 56px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    background-color: #ffffff;
    color: #1e293b;
    outline: none;
    transition: all 0.2s ease;
}

.otp-box:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background-color: #eff6ff;
}

/* Animasyonlar */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content.show {
    animation: fadeInScale 0.25s forwards ease-out;
}

/* Kategori Butonları: Sade, Modern & Akıcı Tasarım (Sıçrama/Büyüme Yok, Eşit Boyut) */
.category-pill {
    height: 32px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
    transform: none !important;
    animation: none !important;
    text-decoration: none !important;
}

.category-pill:hover:not(.category-pill-active) {
    transform: none !important;
}

.category-pill-active {
    font-weight: 600 !important;
    transform: none !important;
    animation: none !important;
}

/* Yatay Kategori Kaydırma Çubuğu (Mobilde Dokunmatik & Akıcı) */
#category-scroll-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
}

/* ========================================================
   Mobil: 2. Sıra (Kategoriler & Tarih Senkronize Animasyonu)
   ======================================================== */

#mobile-category-toggle-btn {
    height: 32px !important;
    transition: all 0.25s ease !important;
}

#mobile-category-chevron {
    font-size: 13px !important;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}

#mobile-category-wrapper {
    display: flex;
    align-items: center;
    transform-origin: left center;
    transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                margin 0.25s ease;
}

#mobile-header-date {
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    transform-origin: right center;
    transition: max-width 0.38s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                margin 0.25s ease,
                padding 0.25s ease;
}

/* Mobilde Durumlar (< 768px) */
@media (max-width: 767.98px) {
    /* KAPALI DURUM: Tarih görünür, kategoriler gizli */
    #mobile-category-wrapper,
    .mobile-cats-closed #mobile-category-wrapper {
        max-width: 0 !important;
        opacity: 0 !important;
        transform: scaleX(0.85) translateX(-12px) !important;
        pointer-events: none !important;
        overflow: hidden !important;
        margin-left: 0 !important;
    }

    #mobile-header-date,
    .mobile-cats-closed #mobile-header-date {
        max-width: 280px !important;
        opacity: 1 !important;
        transform: translateX(0) scale(1) !important;
        pointer-events: auto !important;
        margin-left: auto !important;
    }

    /* AÇIK DURUM: Kategoriler sağa doğru açılır, tarih sağa süzülerek kaybolur */
    .mobile-cats-open #mobile-category-wrapper {
        max-width: 2000px !important;
        opacity: 1 !important;
        transform: scaleX(1) translateX(0) !important;
        pointer-events: auto !important;
        overflow-x: auto !important;
        margin-left: 0.5rem !important;
    }

    .mobile-cats-open #mobile-header-date {
        max-width: 0 !important;
        opacity: 0 !important;
        transform: translateX(20px) scale(0.92) !important;
        pointer-events: none !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .mobile-cats-open #mobile-category-toggle-btn {
        background-color: #eff6ff !important;
        color: #1d4ed8 !important;
        border-color: #bfdbfe !important;
    }

    .mobile-cats-open #mobile-category-chevron {
        transform: rotate(90deg) !important;
        color: #2563eb !important;
    }
}

/* Masaüstü Ekranlarda Her Zaman Doğal Görünüm */
@media (min-width: 768px) {
    #mobile-header-date {
        display: none !important;
    }

    #mobile-category-wrapper {
        max-width: none !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        overflow: visible !important;
        margin-left: 0 !important;
    }

    /* Mobilde kategoriler sonuna eklenen 'Sizden Gelenler' masaüstünde kesinlikle gizlenir */
    #mobile-community-pill,
    .category-pill.md\:hidden {
        display: none !important;
    }
}



