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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f7f7f7;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Nagłówek */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

h1 {
    color: #6441a5; /* Kolor Twitch */
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

/* Sekcje */
section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #6441a5;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

h3 {
    color: #6441a5;
    margin: 15px 0 10px 0;
    font-size: 1.1em;
}

/* Wykres */
.chart-container {
    height: 400px;
    margin: 20px 0;
    position: relative;
}

.history-chart-container {
    margin: 25px 0;
}

.history-separator {
    margin: 30px 0;
    border: none;
    border-top: 1px dashed #ddd;
}

#loading, #error {
    text-align: center;
    padding: 20px;
    font-weight: bold;
}

#error {
    color: #e74c3c;
}

.hidden {
    display: none;
}

/* Tabela danych */
#data-table-container {
    overflow-x: auto;
}

#data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#data-table th,
#data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#data-table th {
    background-color: #f4f0ff;
    color: #6441a5;
    font-weight: bold;
}

#data-table tr:hover {
    background-color: #f9f9f9;
}

/* Style dla wierszy z różnymi zmianami cen */
tr.price-increased td {
    background-color: #ffecef;
}

tr.price-decreased td {
    background-color: #e8f7f0;
}

tr.unavailable td {
    background-color: #f0f0f0;
    color: #777;
}

/* Style dla selektora produktów */
.product-selector {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-selector h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #6441a5;
    font-size: 1.1em;
}

/* Przycisk przełączania wszystkich */
.toggle-all-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #6441a5;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.toggle-all-btn:hover {
    background-color: #7d5bbe;
}

/* Przyciski produktów */
.product-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.product-btn {
    padding: 8px 12px;
    background-color: #ddd;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.product-btn.active {
    background-color: #6441a5;
    color: white;
}

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

/* Sekcja historii cen */
.price-histories-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Stopka */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    color: #777;
    font-size: 0.9em;
}

/* Style dla strony błędu */
.error-container {
    text-align: center;
    padding-top: 50px;
}

.error-content {
    margin: 30px 0;
}

.btn {
    display: inline-block;
    background-color: #6441a5;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #7d5bbe;
}

/* Responsywność */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .chart-container {
        height: 300px;
    }
    
    #data-table th,
    #data-table td {
        padding: 8px 10px;
        font-size: 0.9em;
    }
    
    .product-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}

/* Stare style gif-container - możesz je zostawić, ale nie będą używane */
.gif-container {
    margin: 20px auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-gif {
    max-width: 80%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Nowe style dla obrazka w info-section z najwyższym priorytetem */
.info-section div img {
    display: block !important;
    margin: 0 auto !important;
    max-width: 80% !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
}

.info-section div {
    text-align: center !important;
    width: 100% !important;
    margin: 20px 0 !important;
}