:root {
    --primary: #ff0062;
    --background: #0a0a0a;
    --card: #141414;
    --text: #ffffff;
    --text-secondary: #a0a0a0;
    --border: #2a2a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at top right, rgba(255, 0, 98, 0.15), transparent 25%),
        radial-gradient(circle at bottom left, rgba(255, 0, 98, 0.1), transparent 25%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease;
}

.title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary), rgba(255, 0, 98, 0.5));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(255, 0, 98, 0.3);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.locations-panel {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 0, 98, 0.2);
    padding: 1.5rem;
    animation: fadeInLeft 1s ease;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    font-size: 1rem;
}

.search-button {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: none;
    background: rgba(255, 0, 98, 0.1);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: rgba(255, 0, 98, 0.2);
}

.locations-tree {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.locations-tree::-webkit-scrollbar {
    width: 6px;
}

.locations-tree::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.locations-tree::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.country-item {
    margin-bottom: 1rem;
}

.country-button {
    width: 100%;
    text-align: right;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.country-button:hover {
    background: rgba(255, 0, 98, 0.1);
    color: var(--primary);
}

.province-list {
    margin-right: 1.5rem;
    margin-top: 0.5rem;
    display: none;
}

.province-item {
    margin-bottom: 0.5rem;
}

.province-button {
    width: 100%;
    text-align: right;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.province-button:hover {
    background: rgba(255, 0, 98, 0.1);
    color: var(--primary);
}

.city-list {
    margin-right: 1.5rem;
    margin-top: 0.5rem;
    display: none;
}

.city-button {
    width: 100%;
    text-align: right;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.city-button:hover {
    background: rgba(255, 0, 98, 0.1);
    color: var(--primary);
}

.city-button.active {
    background: var(--primary);
    color: white;
}

.weather-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    animation: fadeInRight 1s ease;
}

.weather-card {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 0, 98, 0.2);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.weather-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.weather-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 0, 98, 0.1),
        transparent
    );
    transition: 0.5s;
}

.weather-card:hover::after {
    left: 100%;
}

.day-name {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.weather-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.weather-card:hover .weather-icon {
    transform: scale(1.2);
}

.weather-description {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.weather-details {
    display: grid;
    gap: 0.5rem;
}

.weather-detail {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    color: var(--text);
    font-weight: 500;
}

.expanded {
    display: block;
    animation: fadeIn 0.3s ease;
}

.chevron {
    transition: transform 0.3s ease;
}

.rotated {
    transform: rotate(90deg);
}

@media (min-width: 1024px) {
    .main-content {
        grid-template-columns: 350px 1fr;
    }

    .locations-panel {
        position: sticky;
        top: 1rem;
    }

    .locations-tree {
        max-height: 600px;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .container {
        padding: 1rem;
    }

    .weather-cards {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}