/**
 * Finans ve Spor Widget Stilleri
 * Modern, responsive tasarım
 */

/* ============================================
   TICKER (Kayan Döviz Bandı)
   ============================================ */
.finance-ticker {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 12px 0;
    overflow: hidden;
    position: relative;
}

.finance-ticker::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(90deg, #1e293b, transparent);
    z-index: 2;
}

.finance-ticker::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(-90deg, #1e293b, transparent);
    z-index: 2;
}

.ticker-track {
    display: flex;
    animation: ticker-scroll 60s linear infinite;
    width: fit-content;
}

.ticker-content {
    display: flex;
    gap: 30px;
    padding: 0 15px;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: #fff;
    font-size: 0.9rem;
}

.ticker-code {
    font-weight: 600;
    color: #94a3b8;
    min-width: 40px;
}

.ticker-rate {
    font-weight: 700;
    font-size: 1rem;
}

.ticker-change {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.ticker-change.positive {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.ticker-change.negative {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Ticker hover pause */
.finance-ticker:hover .ticker-track {
    animation-play-state: paused;
}

/* ============================================
   DÖVİZ ÇEVRİCİ
   ============================================ */
.converter-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.converter-row {
    margin-bottom: 15px;
}

.converter-input-group {
    display: flex;
    gap: 10px;
}

.converter-input-group .form-control {
    flex: 2;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 12px 15px;
    font-size: 1rem;
}

.converter-input-group .form-select {
    flex: 1;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 12px 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.converter-swap {
    text-align: center;
    margin: 10px 0;
}

.converter-swap .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.converter-info {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* ============================================
   KRİPTO WIDGET
   ============================================ */
.crypto-widget {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 15px;
}

.crypto-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crypto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.crypto-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.crypto-info {
    display: flex;
    flex-direction: column;
}

.crypto-symbol {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
}

.crypto-name {
    font-size: 0.8rem;
    color: #64748b;
}

.crypto-price {
    text-align: right;
}

.crypto-price .price {
    display: block;
    font-weight: 600;
    color: #1e293b;
}

.crypto-price .change {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.crypto-price .change.positive {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
}

.crypto-price .change.negative {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

/* ============================================
   ALTIN WIDGET
   ============================================ */
.gold-widget {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 15px;
}

.gold-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.gold-item {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.gold-info {
    margin-bottom: 8px;
}

.gold-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.gold-code {
    font-size: 0.75rem;
    color: #d97706;
    font-weight: 600;
}

.gold-price .price {
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
}

/* ============================================
   BORSA ENDEKS WIDGET
   ============================================ */
.stocks-widget {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 12px;
    padding: 15px;
}

.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
}

.stock-name {
    font-weight: 600;
}

.stock-value {
    font-weight: 700;
}

/* ============================================
   SPOR WIDGET'LARI
   ============================================ */

/* Puan Durumu */
.standsings-widget {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.standings-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}

.standings-tab {
    padding: 12px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.standings-tab:hover {
    color: #3b82f6;
    background: #f1f5f9;
}

.standings-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.standings-content {
    display: none;
    padding: 15px;
}

.standings-content.active {
    display: block;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.standings-table th {
    text-align: left;
    padding: 8px 5px;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

.standings-table td {
    padding: 8px 5px;
    border-bottom: 1px solid #f1f5f9;
}

.standings-table .position {
    font-weight: 600;
    color: #94a3b8;
    width: 25px;
}

.standings-table .team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.standings-table .team-badge {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.standings-table .points {
    color: #3b82f6;
}

.standings-table tr:hover {
    background: #f8fafc;
}

/* Fikstür */
.fixtures-widget {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.fixtures-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fixture-item {
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.fixture-league {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 5px;
}

.fixture-teams {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.fixture-teams .vs {
    color: #94a3b8;
    font-size: 0.8rem;
}

.fixture-info {
    display: flex;
    gap: 15px;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #64748b;
}

.fixture-info .time {
    color: #3b82f6;
    font-weight: 600;
}

/* Sonuçlar */
.results-widget {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.result-league {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 5px;
}

.result-teams {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-teams .score {
    background: #1e293b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
}

.result-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 5px;
}

/* Canlı Skorlar */
.live-scores-widget {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    padding: 15px;
    color: #fff;
}

.live-matches {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.live-match {
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.live-minute {
    font-size: 0.8rem;
    color: #ef4444;
    font-weight: 600;
}

.live-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.live-score {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 1.1rem;
}

.live-league {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 5px;
}

/* ============================================
   GENEL WIDGET STİLLERİ
   ============================================ */
.widget-empty {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
}

.widget-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.widget-loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .ticker-item {
        font-size: 0.8rem;
    }
    
    .converter-input-group {
        flex-direction: column;
    }
    
    .gold-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .standings-tabs {
        padding-bottom: 5px;
    }
    
    .standings-tab {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
    
    .standings-table {
        font-size: 0.75rem;
    }
    
    .fixture-teams {
        flex-wrap: wrap;
        font-size: 0.9rem;
    }
    
    .live-teams {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .finance-ticker {
        padding: 8px 0;
    }
    
    .ticker-item {
        gap: 5px;
    }
    
    .crypto-item {
        padding: 10px;
    }
    
    .gold-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   WIDGET CONTAINER
   ============================================ */
.widget-section {
    margin-bottom: 20px;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: #3b82f6;
}

.widget-body {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Modern Kart Stili */
.widget-style-modern {
    border-radius: 12px;
    overflow: hidden;
}

.widget-style-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.widget-style-minimal {
    background: transparent;
    box-shadow: none;
}

.widget-style-classic {
    border: 2px solid #e2e8f0;
    border-radius: 0;
}
