:root {
    --primary: #00f7ff;
    --secondary: #ff00f7;
    --dark: #0a0a20;
    --light: #e0e0ff;
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    overflow: hidden;
    min-height: 100vh;
    position: relative;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(0, 247, 255, 0.3);
    padding-bottom: 1rem;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 3rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(10, 10, 32, 0.7);
    border: 1px solid var(--primary);
    border-radius: 50px;
    color: var(--light);
    font-size: 1.1rem;
    font-family: 'Rajdhani', sans-serif;
    outline: none;
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.2);
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 25px rgba(0, 247, 255, 0.4);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.6);
}

.weather-display {
    background: rgba(10, 10, 32, 0.5);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 247, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 247, 255, 0.1);
    margin-bottom: 2rem;
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards 0.3s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.current-weather {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 247, 255, 0.2);
}

.location {
    margin-bottom: 0.5rem;
}

.city {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: Arial, Helvetica, sans-serif;
}

.date {
    color: rgba(224, 224, 255, 0.7);
    font-size: 0.9rem;
}

.temp {
    font-size: 5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: 'Orbitron', sans-serif;
    position: relative;
}

.temp::after {
    content: "°C";
    font-size: 2rem;
    position: absolute;
    top: 10px;
    right: -30px;
}

.weather-icon {
    font-size: 4rem;
    margin: 1rem 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.description {
    font-size: 1.5rem;
    text-transform: capitalize;
    margin-bottom: 1rem;
}

.details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.detail-card {
    background: rgba(0, 247, 255, 0.05);
    border: 1px solid rgba(0, 247, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 247, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 247, 255, 0.1);
}

.detail-title {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.forecast-card {
    background: rgba(0, 247, 255, 0.05);
    border: 1px solid rgba(0, 247, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.forecast-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 247, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 247, 255, 0.1);
}

.forecast-day {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.forecast-icon {
    font-size: 2rem;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.forecast-temp {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.forecast-high {
    color: var(--primary);
}

.forecast-low {
    color: var(--secondary);
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent 95%,
            rgba(0, 247, 255, 0.05) 96%);
    background-size: 100% 5px;
    pointer-events: none;
    z-index: 10;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

.glow {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 247, 255, 0.3) 0%, transparent 70%);
    filter: blur(20px);
    z-index: 1;
    animation: float 15s infinite ease-in-out;
}

.glow:nth-child(2) {
    background: radial-gradient(circle, rgba(255, 0, 247, 0.3) 0%, transparent 70%);
    width: 150px;
    height: 150px;
    animation-delay: 5s;
    animation-duration: 20s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(50px, 50px);
    }

    50% {
        transform: translate(0, 100px);
    }

    75% {
        transform: translate(-50px, 50px);
    }
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-bottom-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error-message {
    color: #ff4d4d;
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    header {
        flex-direction: column;
        gap: 0.6rem;
    }

    .current-weather {
        flex-direction: column;
        text-align: center;
    }

    .temp {
        margin: 1rem 0;
        font-size: 3.5rem;
    }

    .city {
        font-size: 1.5rem;
    }
}