* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    color: #2c5f2d;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.cache-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

.cache-info a {
    color: #2c5f2d;
    text-decoration: none;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 0.9em;
}

select, input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
	width: 100%;           /* << ez biztosítja, hogy illeszkedjen a szülőhöz */
    max-width: 100%;       /* << és ne nyúljon túl mobilon sem */
}

select:focus, input:focus {
    outline: none;
    border-color: #2c5f2d;
}

.buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

button {
    padding: 10px 20px;
    background: #2c5f2d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
}

button:hover {
    background: #234a24;
}

.reset-btn {
    background: #666;
}

.reset-btn:hover {
    background: #555;
}

.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    background: linear-gradient(135deg, #2c5f2d 0%, #3a7d3c 100%);
    color: white;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
}

.summary-card h3 {
    font-size: 0.9em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.summary-card .value {
    font-size: 1.8em;
    font-weight: bold;
}

.summary-card .unit {
    font-size: 0.8em;
    opacity: 0.8;
}

/* Desktop table view */
.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

th {
    background: #2c5f2d;
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    white-space: nowrap;
}

td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    font-size: 0.8em;
}

tr:hover {
    background: #f9f9f9;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.number {
    text-align: right;
    font-family: 'Courier New', monospace;
}

.data-source {
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
    color: #888;
}

.data-source a {
    color: #4CAF50;
    text-decoration: none;
}

/* Mobile card view - hidden by default */
.mobile-card-view {
    display: none;
}

/* iPhoneXR és kisebb kijelzők */
@media screen and (max-width: 896px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
        max-width: 100%;
    }
    
    h1 {
        font-size: 1.4em;
        text-align: center;
    }
    
    .cache-info {
        font-size: 0.8em;
        text-align: center;
    }
    
    .filters {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
		width: 100%;
        overflow-x: hidden; /* Megakadályozza, hogy bármi túlnyúljon */
		
    }
	
	.filter-group {
        width: 100%;
    }
	
    .summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .summary-card {
        padding: 15px;
    }
    
    .summary-card h3 {
        font-size: 0.75em;
    }
    
    .summary-card .value {
        font-size: 1.4em;
    }
    
    /* Hide desktop table on mobile */
    .table-wrapper {
        display: none !important;
    }
    
    /* Show mobile card view */
    .mobile-card-view {
        display: block !important;
    }
    
    .project-card {
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .project-card .project-name {
        font-weight: 600;
        color: #2c5f2d;
        margin-bottom: 12px;
        font-size: 1em;
        line-height: 1.4;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 8px;
    }
    
    .project-card .project-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        font-size: 0.9em;
    }
    
    .project-card .detail-item {
        display: flex;
        flex-direction: column;
        margin-bottom: 8px;
    }
    
    .project-card .detail-label {
        font-size: 0.75em;
        color: #666;
        margin-bottom: 4px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .project-card .detail-value {
        color: #333;
        font-size: 0.85em;
    }
    
    .project-card .detail-numbers {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #e0e0e0;
    }
    
    .project-card .number-item {
        text-align: center;
        padding: 8px;
        background: #f9f9f9;
        border-radius: 4px;
    }
    
    .project-card .number-label {
        font-size: 0.7em;
        color: #666;
        margin-bottom: 4px;
        font-weight: 600;
    }
    
    .project-card .number-value {
        font-weight: 600;
        color: #2c5f2d;
        font-family: 'Courier New', monospace;
        font-size: 0.9em;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Extra small devices */
@media screen and (max-width: 380px) {
    .summary {
        grid-template-columns: 1fr;
    }
    
    .project-card .project-details {
        grid-template-columns: 1fr;
    }
    
    .project-card .detail-numbers {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    .project-card {
        padding: 12px;
    }
}