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

:root {
    --primary-color: #4CAF50;
    --primary-dark: #45a049;
    --secondary-color: #ff5e39;
    --background: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --success: #4CAF50;
    --danger: #f44336;
    --warning: #ff9800;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

.search-box {
    padding: 40px 30px;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.input-group {
    display: flex;
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
}

#ilanNoInput {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    outline: none;
}

#ilanNoInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

#ilanNoInput::placeholder {
    color: #999;
}

.btn-search {
    padding: 16px 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-search:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.info-text {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.loading {
    padding: 60px 30px;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error-message {
    padding: 30px;
    margin: 20px;
    background: #ffebee;
    border-left: 4px solid var(--danger);
    border-radius: 8px;
    color: var(--danger);
    font-weight: 500;
}

.results-container {
    padding: 30px;
}

.ilan-info {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.ilan-info h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.ilan-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ilan-meta span {
    background: #f0f0f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.current-price-box {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.current-price-label {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 700;
}

.fiyat-istatistikleri {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.positive {
    color: var(--success);
}

.stat-value.negative {
    color: var(--danger);
}

.history-table-container {
    margin-bottom: 40px;
}

.history-table-container h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: #f9f9f9;
}

tbody tr:last-child td {
    border-bottom: none;
}

.price-up {
    color: var(--success);
    font-weight: 600;
}

.price-down {
    color: var(--danger);
    font-weight: 600;
}

.price-same {
    color: var(--text-secondary);
}

.chart-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.chart-container h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

#priceChart {
    position: relative;
    height: 400px;
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;
    padding: 30px;
    color: white;
    font-size: 0.9rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .input-group {
        flex-direction: column;
    }

    .btn-search {
        width: 100%;
    }

    .fiyat-istatistikleri {
        grid-template-columns: 1fr;
    }

    .table-wrapper {
        font-size: 0.9rem;
    }

    th, td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header {
        padding: 25px 15px;
    }

    .search-box {
        padding: 25px 15px;
    }

    .results-container {
        padding: 20px 15px;
    }

    #priceChart {
        height: 300px;
    }
}

