/* Modern ve Şık Döviz Ekranı Tasarımı */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 20px;
    z-index: 100;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1f2937, #111827);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header h1 a {
    text-decoration: none;
    color: inherit;
}

.header h1 a:hover {
    text-decoration: none;
    color: inherit;
}

.header h1 a:visited {
    color: inherit;
}

.header h1 a:active {
    color: inherit;
}

.last-update {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
    flex-wrap: wrap;
}


.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4757;
    animation: pulse 2s infinite;
}

.status-indicator.connected {
    background: #2ed573;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes updateGlow {
    0% { 
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.3);
    }
    50% { 
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    }
    100% { 
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.3);
    }
}

@keyframes rowUpdate {
    0% { 
        transform: scale(1);
        background-color: rgba(16, 185, 129, 0.1);
    }
    50% { 
        transform: scale(1.02);
        background-color: rgba(16, 185, 129, 0.2);
    }
    100% { 
        transform: scale(1);
        background-color: transparent;
    }
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Section Container for unified design */
.gold-section, .currency-section {
    display: flex;
    flex-direction: column;
}

/* Section Headers */
.section-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 12px 12px 0 0;
    padding: 20px 25px;
    margin-bottom: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Price Table Container */
.price-table-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: none;
    overflow: hidden;
    max-height: 500px;
    overflow-y: auto;
    position: relative;
}

/* Price Table */
.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.price-table thead {
    background: #e9ecef;
    position: sticky;
    top: 0;
    z-index: 10;
}

.price-table thead th {
    background: #e9ecef;
    position: sticky;
    top: 0;
    z-index: 10;
}

.price-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid rgba(31, 41, 55, 0.2);
    font-size: 0.9rem;
    background: #e9ecef;
    position: sticky;
    top: 0;
    z-index: 10;
}

.price-table td {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.price-table tbody tr:hover {
    background: rgba(31, 41, 55, 0.03);
}

.price-table tbody tr:hover td {
    background: transparent;
}

.symbol {
    font-weight: 600;
    color: #333;
}

.buy-price, .sell-price {
    font-weight: 500;
    color: #333;
    text-align: right;
}

.change {
    font-weight: 600;
    text-align: right;
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Price Cards */
.price-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 20px 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 1);
}

.price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1f2937, #111827);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.price-card:hover::before {
    opacity: 1;
}

/* Price Header */
.price-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.symbol {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.currency {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* Price Value */
.price-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    transition: all 0.3s ease;
    text-align: right;
}

/* Price Change */
.price-change {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.change-value {
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.change-percent {
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Color Classes */
.positive {
    color: #16a34a;
}

.negative {
    color: #dc2626;
}

.neutral {
    color: #6b7280;
}

/* Animation Classes */
.price-up {
    animation: priceUp 0.6s ease-out;
}

.price-down {
    animation: priceDown 0.6s ease-out;
}

@keyframes priceUp {
    0% { 
        color: #16a34a;
        transform: scale(1.01);
    }
    100% { 
        color: #16a34a;
        transform: scale(1);
    }
}

@keyframes priceDown {
    0% { 
        color: #dc2626;
        transform: scale(1.01);
    }
    100% { 
        color: #dc2626;
        transform: scale(1);
    }
}

/* Footer */
.footer {
    text-align: center;
    color: #000000;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        position: relative;
        top: 0;
        padding: 20px;
        border-radius: 12px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .last-update {
        font-size: 0.8rem;
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }
    
    .section-header {
        padding: 15px 20px;
        border-radius: 12px 12px 0 0;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .price-table-container {
        max-height: 400px;
        border-radius: 0 0 12px 12px;
    }
    
    .price-table th {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
    
    .price-table td {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .symbol {
        font-size: 0.9rem;
    }
    
    .buy-price, .sell-price {
        font-size: 0.85rem;
    }
    
    .change {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .last-update {
        font-size: 0.75rem;
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    .section-header {
        padding: 12px 15px;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .price-table-container {
        max-height: 350px;
    }
    
    .price-table th {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .price-table td {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .symbol {
        font-size: 0.85rem;
    }
    
    .buy-price, .sell-price {
        font-size: 0.8rem;
    }
    
    .change {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    .main-content {
        gap: 15px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 8px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
    
    .price-table th {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    .price-table td {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .symbol {
        font-size: 0.8rem;
    }
    
    .buy-price, .sell-price {
        font-size: 0.75rem;
    }
    
    .change {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
}

/* Loading Animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Update Effect Classes */
.update-effect {
    animation: updateGlow 1.5s ease-out;
}

.row-update-effect {
    animation: rowUpdate 0.4s ease-out;
}

.status-updating {
    background: #f59e0b !important;
    animation: pulse 1s infinite !important;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}
