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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 20px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

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

.search-card, .peak-info-card, .results-card, .error-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.cards-container > .search-card,
.cards-container > .peak-info-card {
    margin-bottom: 0;
}

.search-card h2, .peak-info-card h2, .results-card h2 {
    color: #667eea;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-info {
    display: none;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

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

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

td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

tbody tr:nth-child(odd) {
    background-color: #fafbfc;
}

tbody tr:nth-child(odd):hover {
    background-color: #f8f9fa;
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    font-weight: bold;
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    color: white;
    font-weight: bold;
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
    color: white;
    font-weight: bold;
}

.error-card {
    background: #fee;
    border-left: 4px solid #e33;
}

.error-card h3 {
    color: #c33;
    margin-bottom: 10px;
}

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

footer a {
    color: #ffffff;
    text-decoration: underline;
    opacity: 0.9;
    transition: opacity 0.2s;
}

footer a:hover {
    opacity: 1;
    text-decoration: none;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

th.sortable:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

th.sortable .sort-arrow {
    display: inline-block;
    margin-left: 5px;
    opacity: 0.7;
}

th.sort-asc,
th.sort-desc {
    background-color: rgba(255, 255, 255, 0.15);
}

.flatpickr-current-month .numInputWrapper {
    display: none !important;
}

.flatpickr-current-month .cur-year {
    display: none !important;
}

.flatpickr-current-month span.cur-year {
    display: none !important;
}

.flatpickr-current-month .numInput {
    display: none !important;
}

.flatpickr-current-month .arrowUp,
.flatpickr-current-month .arrowDown {
    display: none !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    width: 100%;
}

.peak-results {
    margin-top: 20px;
}

.peak-results .table-wrapper {
    margin-top: 15px;
}

.peaks-cell {
    font-size: 0.9em;
    line-height: 1.6;
}

.peak-entry {
    margin: 0.25em 0;
    padding: 0.25em 0;
}

.peak-entry:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.peak-rank {
    font-weight: bold;
    color: #667eea;
    margin-right: 0.5em;
}

.peak-dates {
    color: #333;
    font-weight: 500;
}

.peak-snowfall {
    color: #4a90e2;
    margin-left: 0.5em;
}

.peak-confidence {
    margin-left: 0.5em;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 500;
}

.confidence-high {
    background-color: #d4edda;
    color: #155724;
}

.confidence-medium {
    background-color: #fff3cd;
    color: #856404;
}

.confidence-low {
    background-color: #f8d7da;
    color: #721c24;
}

.resort-name {
    font-weight: 600;
    color: #667eea;
}

#peakResults {
    display: none;
}

.about-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.about-content h2:first-of-type {
    margin-top: 0;
}

.about-content p {
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.about-content li {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-content li:last-child {
    margin-bottom: 0;
}

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

    .cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .search-card, .peak-info-card, .results-card {
        padding: 20px;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 10px;
    }
}
