/* Reset ve Temel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    zoom: 1;
    position: fixed;
    top: 0;
    left: 0;
}

.container {
    width: 1920px;
    height: 1080px;
    max-width: 1920px;
    max-height: 1080px;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

/* 1920x1080 için optimizasyon */
@media screen and (width: 1920px) and (height: 1080px) {
    body {
        zoom: 1;
        transform: scale(1);
    }
    
    .container {
        width: 1920px;
        height: 1080px;
        transform: none;
    }
}

/* Büyük ekranlar için scaling */
@media screen and (min-width: 1920px) {
    body {
        transform: scale(calc(100vw / 1920));
        transform-origin: top left;
    }
    
    .container {
        width: 1920px;
        height: 1080px;
    }
}

/* Header Stilleri - TV Optimize */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    height: 100px;
    flex-shrink: 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 80px;
    width: auto;
}

.logo-section h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}

.datetime-section {
    text-align: right;
}

.time {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
	color:white;
	text-shadow: black 0px 0px 6px;  
}

.date {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Ana Grid Düzeni - TV Tam Ekran Optimize */
.main-grid {
    display: grid;
    grid-template-columns: 580px 720px 480px;
    gap: 20px;
    padding: 20px;
    flex: 1;
    height: 920px;
    max-height: 920px;
    width: 1880px;
    max-width: 1880px;
    overflow: hidden;
    margin: 0 auto;
    justify-self: center;
}

/* Bölüm Header'ları */
.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

.section-header i {
    font-size: 1.8rem;
    color: #3498db;
}

.section-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Haberler Bölümü - Tam Yükseklik */
.news-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 920px;
    max-height: 920px;
    display: flex;
    flex-direction: column;
    min-height: 920px;
}

.news-content {
    flex: 1;
    overflow-y: auto;
    height: calc(920px - 140px);
    min-height: calc(920px - 140px);
}

.news-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid #3498db;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.2);
}

.news-item h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
}

.news-item p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-date {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-style: italic;
}


/* Sağ video paneli - Tam yükseklik kullan */
.video-carousel {
    width: 460px;
    height: 920px;
    max-width: 460px;
    max-height: 920px;
    margin: 0;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #2c3e50;
    position: relative;
}

.video-item {
    width: 100%;
    height: 100%;
    max-width: 460px;
    max-height: 920px;
    object-fit: cover;
    background: #000;
    border-radius: 15px;
    margin: 0;
    display: block;
}

.video-item.active {
    display: block;
}

.video-item video {
    width: 100%;
    height: 100%;
    max-height: 920px;
    object-fit: cover;
    border-radius: 15px;
}

.media-item {
    display: none;
    width: 100%;
    height: 100%;
}

.media-item.active {
    display: block;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.carousel-dots {
    display: none;
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #bdc3c7;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
    background: #3498db;
    transform: scale(1.2);
}

/* Grid Column Assignments */
.news-section {
    grid-column: 1 / 2;
    height: 920px;
    max-height: 920px;
    min-height: 920px;
}

.info-section {
    grid-column: 2 / 3;
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    overflow: visible;
    height: 920px;
    max-height: 920px;
    min-height: 920px;
}

.media-section {
    grid-column: 3 / 4;
    background: transparent;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    overflow: hidden;
    width: 480px;
    max-width: 480px;
}

.weather-widget,
.fixture-widget {
    background: white;
    border-radius: 20px;
    padding: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 400px;
    max-height: 400px;
    min-height: 400px;
    overflow: hidden;
}

/* Grid pozisyonları */
.weather-widget {
    grid-column: 1;
    grid-row: 1;
}

.fixture-widget {
    grid-column: 2;
    grid-row: 1;
}

.photo-slider {
    grid-column: 1 / 3;
    grid-row: 2;
    background: white;
    border-radius: 20px;
    padding: 0px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Fotoğraf Slider Stilleri - Galeri Entegrasyonu */
.photo-carousel {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    background: #f8f9fa;
}

.photo-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    background: #2c3e50;
}

.photo-item.active {
    opacity: 1;
    transform: translateX(0);
}

.photo-item.prev {
    transform: translateX(-100%);
}

.photo-item.next {
    transform: translateX(100%);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    background: #ecf0f1;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.02);
}

.photo-caption {
    display: none;
}

/* Galeri yükleme durumu */
.photo-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #7f8c8d;
    font-size: 1.1rem;
    text-align: center;
    flex-direction: column;
    gap: 15px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
}

.photo-loading i {
    font-size: 2rem;
    color: #3498db;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Galeri sürekli animasyon */
.photo-carousel {
    background: linear-gradient(45deg, #2c3e50, #3498db) !important;
}

.photo-item {
    background: rgba(0,0,0,0.8) !important;
}

.photo-item img {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Galeri boş durumu */
.photo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #7f8c8d;
    text-align: center;
    flex-direction: column;
    gap: 10px;
}

.photo-empty i {
    font-size: 2.5rem;
    color: #bdc3c7;
    margin-bottom: 10px;
}

/* Resim geçiş efektleri */
.photo-item.slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.photo-item.slide-out-left {
    animation: slideOutLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

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

/* Responsive düzenlemeler */
@media (max-width: 900px) {
    .photo-item img {
        height: 100%;
    }
}

/* Hava Durumu Widget'ı - Tam Yükseklik */
.weather-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.weather-current {
    text-align: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.weather-temp {
    font-size: 3.5rem;
    font-weight: 300;
    color: #3498db;
    margin-bottom: 10px;
}

.weather-desc {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.weather-location {
    font-size: 1rem;
    color: #95a5a6;
}

.weather-forecast {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.forecast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.forecast-item:hover {
    background: #e9ecef;
}

.forecast-item i {
    color: #f39c12;
    font-size: 1.2rem;
}

/* Fikstür Widget'ı - Tam Yükseklik */
.fixture-widget .section-header {
    display: none !important; /* Başlığı gizle */
}

.fixture-content {
    flex: 1;
    overflow-y: auto;
    height: 100%;
    padding-top: 10px; /* Başlık olmadığı için üst padding */
}

.fixture-item {
    background: linear-gradient(135deg, #ecf0f1 0%, #d5dbdb 100%);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 8px;
    border-left: 4px solid #e74c3c;
    transition: all 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

/* Fikstür sayfa değişim animasyonları */
.fixture-item.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.fixture-item.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fixtureSlideIn 0.6s ease forwards;
}

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

.fixture-item:hover {
    transform: translateX(8px);
}

.players {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.players.doubles-match {
    font-size: 0.85rem;
}

.player1,
.player2 {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    flex: 1;
    cursor: help;
}

.player1 {
    text-align: left;
}

.player2 {
    text-align: right;
}

.vs {
    background: #e74c3c;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    margin: 0 8px;
    min-width: 30px;
    text-align: center;
}

.match-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0px;
    gap: 8px;
}

.court {
    background: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.time {
    font-weight: 600;
    color: white !important;
    
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.match-category {
    flex: 1;
    text-align: center;
}

.match-category small {
    color: #7f8c8d;
    font-size: 0.7rem;
    font-style: italic;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
}

.more-matches {
    border-top: 1px solid #e9ecef;
    margin-top: 10px;
    padding-top: 5px;
}

/* Footer - TV Optimize */
.footer {
    background: #2c3e50;
    color: white;
    padding: 15px 30px;
    height: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.contact-info i {
    color: #3498db;
    width: 20px;
}

/* Scrollbar Stilleri */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

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

.news-item,
.fixture-item {
    animation: fadeIn 0.6s ease forwards;
}

/* Responsive Adjustments for TV Display */
@media screen and (max-width: 1920px) {
    .container {
        width: 100vw;
        height: 100vh;
    }
}

/* Gece Modu (Opsiyonel) */
.night-mode {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.night-mode .news-item,
.night-mode .fixture-item {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.night-mode .weather-widget,
.night-mode .fixture-widget {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* TV Full Screen Optimizations */
@media screen and (width: 1920px) and (height: 1080px) {
    body {
        zoom: 1;
        overflow: hidden;
        transform: none;
    }
    
    .container {
        width: 1920px;
        height: 1080px;
        max-width: 1920px;
        max-height: 1080px;
        transform: none;
    }
    
    .main-grid {
        height: 920px;
        max-height: 920px;
        width: 1880px;
        max-width: 1880px;
    }
    
    .video-carousel {
        height: 920px;
        max-height: 920px;
    }
}

/* Raspberry Pi TV Browser Optimize */
@media screen and (min-width: 1800px) {
    .container {
        max-width: 1920px;
        max-height: 1080px;
        margin: 0 auto;
    }
}

/* Mobile/Tablet Fallback */
@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .news-section {
        grid-column: 1;
        grid-row: 1;
    }
    
    .info-section {
        grid-column: 1;
        grid-row: 2;
    }
    
    .media-section {
        grid-column: 1;
        grid-row: 3;
    }
    
    .video-carousel {
        width: 90vw;
        height: 60vh;
        max-width: 500px;
        max-height: 400px;
    }
    
    .video-item {
        max-width: 90vw;
        max-height: 60vh;
    }
}

/* Hava Durumu Widget Güncellemeleri - Beyaz Arka Plan */
.weather-widget {
    background: white !important;
    color: #2c3e50 !important;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.weather-widget .section-header {
    border-bottom-color: #e9ecef !important;
    margin-bottom: 20px;
}

.weather-widget .section-header h2 {
    color: #2c3e50 !important;
    font-size: 1.3rem !important;
}

.weather-widget .section-header i {
    color: #3498db !important;
}

/* Mevcut hava durumu gösterimi - Beyaz Arka Plan */
.current-temp-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.weather-temp {
    font-size: 3.5rem !important;
    font-weight: 300;
    color: #2c3e50 !important;
    line-height: 1;
}

.weather-details {
    flex: 1;
}

.weather-desc {
    font-size: 1.3rem !important;
    color: #34495e !important;
    margin-bottom: 4px;
    font-weight: 500;
}

.weather-location {
    font-size: 1.1rem !important;
    color: #7f8c8d !important;
}

/* Tahmin kartları - Pano için compact */
.weather-forecast {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    flex: 1;
}

.forecast-day-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 4px;
    align-items: center;
    min-height: 52px;
}

.forecast-day-card:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.day-name {
    grid-column: 1;
    grid-row: 1;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.1;
}

.day-date {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.85rem;
    color: #7f8c8d;
    line-height: 1;
}

.weather-icon {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 1.6rem !important;
    color: #f39c12 !important;
    margin: 0 12px;
}

.temp-range {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
}

.max-temp {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.min-temp {
    font-size: 1rem;
    color: #7f8c8d;
}

.weather-stats {
    grid-column: 3;
    grid-row: 2;
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: #6c757d;
    justify-self: end;
}

.sun-hours, .rain-chance {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Farklı hava durumları için arka plan renkleri - Beyaz Tema */
.weather-widget.sunny {
    background: white !important;
    border-color: #3498db;
}

.weather-widget.cloudy {
    background: white !important;
    border-color: #95a5a6;
}

.weather-widget.rainy {
    background: white !important;
    border-color: #7f8c8d;
}

/* Responsive düzenlemeler - Beyaz Tema */
@media (max-width: 900px) {
    .forecast-day-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        text-align: center;
        gap: 4px;
        min-height: 45px;
        padding: 8px 10px;
    }
    
    .day-name, .day-date, .weather-icon, .temp-range, .weather-stats {
        grid-column: 1;
        justify-self: center;
    }
    
    .weather-icon {
        margin: 4px 0;
        font-size: 1.4rem !important;
    }
    
    .day-name {
        font-size: 0.95rem;
        color: #2c3e50;
    }
    
    .day-date {
        font-size: 0.8rem;
        color: #7f8c8d;
    }
    
    .max-temp {
        font-size: 1.1rem;
        color: #2c3e50;
    }
    
    .min-temp {
        font-size: 0.95rem;
        color: #7f8c8d;
    }
    
    .weather-stats {
        font-size: 0.75rem;
        gap: 8px;
        color: #6c757d;
    }
}

/* TTF Haberleri Stilleri - Tek Haber Carousel */
.ttf-news-carousel {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    background: #f8f9fa;
}

.ttf-news-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.ttf-news-item.active {
    opacity: 1;
    transform: translateX(0);
}

.ttf-news-item.prev {
    transform: translateX(-100%);
}

.ttf-news-item.next {
    transform: translateX(100%);
}

.ttf-news-image-container {
    position: relative;
    flex: 1;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.ttf-news-image-container img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: top center;
    transition: transform 0.3s ease;
}

.ttf-news-item:hover .ttf-news-image-container img {
    transform: scale(1.02);
}

.ttf-news-title {
    height: 70px;
    min-height: 70px;
    padding: 15px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-top: 2px solid #e9ecef;
    flex-shrink: 0;
}

.ttf-news-title span {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ttf-news-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* Basit Galeri Stilleri */
.simple-gallery-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

.gallery-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.gallery-item.active {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.photo-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    z-index: 10;
    font-weight: 500;
}

.gallery-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 25px 15px 15px;
    text-align: center;
}

.gallery-title {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
}