* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    min-height: 100%;
    font-family: 'Outfit', sans-serif;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-image: url('bg_image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    min-height: 100vh;
    padding: max(20px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    min-height: 100%;
    padding: 20px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.glass-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 50px;
    text-align: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
    max-width: 900px;
    width: 100%;
}

h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ffffff, #a8c0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

p {
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
}

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

.actions-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-bist {
    background: linear-gradient(135deg, #10b981 0%, #059669 60%, #047857 100%);
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.btn-bist:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.55);
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-color: rgba(52, 211, 153, 0.6);
}

.btn-test {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(168, 192, 255, 0.2);
}

.btn-test:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-action:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.25rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 30px 0;
    width: 100%;
}

.dash-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    transition: all 0.3s ease;
}

.dash-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.dash-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
}

.dash-icon {
    font-size: 1.3rem;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.progress-cpu {
    background: linear-gradient(90deg, #ff8a00, #e52e71);
    box-shadow: 0 0 10px rgba(229, 46, 113, 0.5);
}

.progress-mem {
    background: linear-gradient(90deg, #11998e, #38ef7d);
    box-shadow: 0 0 10px rgba(56, 239, 125, 0.5);
}

.progress-disk {
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    box-shadow: 0 0 10px rgba(0, 114, 255, 0.5);
}

.dash-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.dash-details {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    background-color: #38ef7d;
    border-radius: 50%;
    box-shadow: 0 0 8px #38ef7d;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 14px #38ef7d;
    }
    100% {
        transform: scale(0.9);
        opacity: 0.6;
    }
}

.uptime-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 15px;
    font-weight: 300;
}

/* Sol Haber Paneli */
.news-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 320px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
    overflow: hidden;
}

.news-header {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Haber Filtre Sekmeleri */
.news-filter-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.filter-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.filter-tab.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.tab-count {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.tab-count.eco {
    background: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

/* Kaynak Filtreleme Seçimi */
.news-source-filter-wrapper {
    position: relative;
    width: 100%;
}

.source-filter-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.source-filter-select:hover, .source-filter-select:focus {
    border-color: rgba(255, 255, 255, 0.25);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.source-filter-select option {
    background: #181d2a;
    color: #fff;
    padding: 6px;
}

.news-feed {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Scrollbar Styles */
.news-feed::-webkit-scrollbar {
    width: 6px;
}
.news-feed::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
.news-feed::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.news-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 16px;
    text-decoration: none;
    color: white;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Ekonomi Etkisi Olan Haberler */
.news-item.economic-impact {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(16, 185, 129, 0.35);
    border-left: 4px solid #10b981;
    box-shadow: 0 2px 14px rgba(16, 185, 129, 0.08);
}

.news-item.economic-impact:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(255, 255, 255, 0.06) 100%);
    border-color: rgba(52, 211, 153, 0.6);
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.22);
}

/* Meta Bar: Rozetler ve Zaman */
.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.news-meta-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Kaynak Rozeti */
.source-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.source-badge:hover {
    transform: translateY(-1px);
    filter: brightness(1.25);
}

.source-badge.source-ntv {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.35);
}

.source-badge.source-bbc {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.35);
}

.source-badge.source-cnn {
    background: rgba(220, 38, 38, 0.22);
    color: #fca5a5;
    border-color: rgba(252, 165, 165, 0.35);
}

.source-badge.source-bloomberg-ht,
.source-badge.source-bloomberg {
    background: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.45);
}

.source-badge.source-dunya {
    background: rgba(14, 165, 233, 0.22);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.45);
}

.source-badge.source-ekonomim {
    background: rgba(139, 92, 246, 0.22);
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.45);
}

.source-badge.source-investing-com,
.source-badge.source-investing {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
    border-color: rgba(52, 211, 153, 0.45);
}

.source-badge.source-cnbc {
    background: rgba(6, 182, 212, 0.22);
    color: #67e8f9;
    border-color: rgba(34, 211, 238, 0.45);
}

/* Ekonomi Rozeti */
.eco-badge {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.35) 100%);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.5);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.news-time {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.news-item h3 {
    font-size: 0.93rem;
    font-weight: 500;
    line-height: 1.45;
    color: #f3f4f6;
    margin: 0;
}

.news-orig-title {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
    line-height: 1.35;
}

.news-eco-reason {
    background: rgba(16, 185, 129, 0.1);
    border-left: 2px solid #10b981;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.74rem;
    color: #a7f3d0;
    line-height: 1.35;
    margin-top: 2px;
}

.reason-icon {
    font-size: 0.8rem;
}

.news-empty, .news-loading {
    text-align: center;
    padding: 30px 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Dünya Saatleri */
.clocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin: 20px 0;
    width: 100%;
}

.clock-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.clock-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.clock-city {
    font-size: 0.9rem;
    font-weight: 500;
    color: #a8c0ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.clock-time {
    font-size: 1.8rem;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

/* Endeksler & Hisseler */
.indices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
    width: 100%;
}

.index-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.index-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.index-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.index-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
    font-variant-numeric: tabular-nums;
}

.index-change {
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 8px;
}

.index-up {
    color: #38ef7d;
}

.index-down {
    color: #ff4b4b;
}

.index-loading {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    width: 100%;
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

.index-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
    font-weight: 300;
}

/* ===================================================
   MOBİL VE TABLET DUYARLI (RESPONSIVE) İYİLEŞTİRMELERİ
   =================================================== */

/* Tablet Görünümü (<= 992px) */
@media (max-width: 992px) {
    body {
        align-items: flex-start;
        padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        background-attachment: scroll;
    }
    .container {
        flex-direction: column-reverse;
        align-items: center;
        height: auto;
        padding: 8px 4px;
        gap: 20px;
    }
    .news-panel {
        width: 100%;
        max-width: 900px;
        min-width: 0;
        height: 420px;
    }
    .glass-panel {
        max-width: 900px;
        width: 100%;
        padding: 35px 30px;
    }
    h1 {
        font-size: 2.5rem;
    }
}

/* Akıllı Telefon / Mobil Görünüm (<= 640px) */
@media (max-width: 640px) {
    body {
        padding: max(10px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        background-attachment: scroll;
    }
    .container {
        padding: 4px;
        gap: 12px;
    }
    .glass-panel {
        padding: 20px 14px;
        border-radius: 18px;
        max-width: 100%;
    }
    h1 {
        font-size: 1.65rem;
        letter-spacing: 0.5px;
        margin-bottom: 6px;
        line-height: 1.25;
    }
    .live-indicator {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    /* Sistem Kartları Tek Kolon */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 16px 0;
    }
    .dash-card {
        padding: 14px;
        border-radius: 14px;
    }
    .dash-value {
        font-size: 1.5rem;
    }
    .dash-title {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
    .dash-details {
        font-size: 0.8rem;
    }

    /* Saatler: 2 Kolon Temiz Düzen (Sonuncu saat İstanbul merkezde tam genişlik) */
    .clocks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 14px 0;
    }
    .clock-item {
        padding: 12px 8px;
        border-radius: 14px;
    }
    .clock-item:last-child {
        grid-column: span 2;
    }
    .clock-city {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
        margin-bottom: 3px;
    }
    .clock-time {
        font-size: 1.25rem;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }

    /* Endeksler ve Hisseler: 2 Kolon (Tek kalan son kart tam genişlik) */
    .indices-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 12px 0;
    }
    .index-item {
        padding: 10px 6px;
        border-radius: 12px;
    }
    .index-item:last-child:nth-child(odd) {
        grid-column: span 2;
    }
    .index-name {
        font-size: 0.78rem;
        letter-spacing: 0.5px;
        margin-bottom: 3px;
    }
    .index-price {
        font-size: 1.15rem;
        margin-bottom: 3px;
    }
    .index-change {
        font-size: 0.72rem;
        padding: 2px 6px;
        border-radius: 6px;
        white-space: nowrap;
        max-width: 100%;
        justify-content: center;
    }
    .index-time {
        font-size: 0.7rem;
        margin-top: 5px;
    }

    /* Sistem Çalışma Süresi */
    .uptime-text {
        font-size: 0.8rem;
        margin-top: 12px;
    }

    /* Eylem Butonları - Dokunmatik Dostu */
    .actions-container {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 18px;
    }
    .btn-action {
        width: 100%;
        padding: 14px 16px;
        min-height: 48px;
        font-size: 0.95rem;
        border-radius: 12px;
        justify-content: center;
        text-align: center;
        touch-action: manipulation;
    }
    .btn-icon {
        font-size: 1.15rem;
    }

    /* Haber Paneli */
    .news-panel {
        height: 380px;
        max-height: 60vh;
        border-radius: 18px;
        overscroll-behavior-y: contain;
    }
    .news-header {
        padding: 14px 16px;
    }
    .news-header h2 {
        font-size: 1.05rem;
    }
    .news-feed {
        padding: 10px;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }
    .news-item {
        padding: 12px;
        border-radius: 10px;
        gap: 6px;
    }
    .news-item h3 {
        font-size: 0.85rem;
        line-height: 1.35;
    }
    .news-item span {
        font-size: 0.7rem;
    }
}

/* Küçük Ekranlar (<= 380px) */
@media (max-width: 380px) {
    .glass-panel {
        padding: 16px 10px;
    }
    h1 {
        font-size: 1.45rem;
    }
    .indices-grid {
        grid-template-columns: 1fr;
    }
    .index-item:last-child:nth-child(odd) {
        grid-column: auto;
    }
}
