:root {
    /* New Ocean/Teal Theme */
    --primary-gradient: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%);
    --secondary-gradient: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    --card-bg: rgba(255, 255, 255, 0.18);
    --card-border: rgba(255, 255, 255, 0.35);
    --text-color: #ffffff;
    --text-secondary: #e8f4f8;
    --accent-color: #ffd700;
    --accent-secondary: #00d2ff;
    --font-main: 'Outfit', sans-serif;
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--primary-gradient);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 3D Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-out 2.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.splash-content {
    text-align: center;
    animation: scaleIn 0.8s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.splash-logo i {
    color: white;
    animation: float 2s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.splash-title {
    font-size: 3rem;
    font-weight: 800;
    margin-top: 20px;
    letter-spacing: 2px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.splash-subtitle {
    font-size: 1.2rem;
    margin-top: 10px;
    opacity: 0.9;
    font-weight: 300;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin: 30px auto 0;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: white;
    border-radius: 10px;
    animation: loadProgress 2.5s ease-out forwards;
}

@keyframes loadProgress {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* Main Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    animation: slideUp 0.8s ease-out 3s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out 3.2s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo-section i {
    font-size: 2.5rem;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.logo-section h1 {
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 2rem;
}

.tagline {
    margin-top: 5px;
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 300;
}

/* Search Section */
.search-container {
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out 3.4s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

input {
    flex: 1;
    padding: 15px 25px;
    border-radius: 30px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-family: var(--font-main);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

button {
    padding: 15px 30px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    box-shadow: var(--shadow-md);
}

#search-btn {
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    color: white;
}

#location-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px 25px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

button:active {
    transform: translateY(-1px);
}

.search-history {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.history-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.history-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Weather Container */
.weather-container {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Current Weather */
.current-weather {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    perspective: 1000px;
}

.current-weather:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.weather-info h2 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.temp-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.temp-container img {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.temp-details h3 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.feels-like {
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 5px;
}

#weather-desc {
    font-size: 1.3rem;
    text-transform: capitalize;
    color: var(--text-secondary);
    font-weight: 500;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.detail-card:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.detail-card i {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.detail-card div p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 3px;
}

.detail-card div span {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Additional Info Cards */
.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px) rotateX(5deg);
    box-shadow: var(--shadow-lg);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.info-header i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.info-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-item i {
    font-size: 1.3rem;
    opacity: 0.8;
}

.info-item div p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.info-item div span {
    font-size: 1.1rem;
    font-weight: 600;
}

/* AQI Display */
.aqi-display {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}

.aqi-value {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.aqi-label {
    font-size: 1rem;
    font-weight: 500;
}

.aqi-details {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.aqi-details p {
    font-size: 0.9rem;
}

/* AQI Color Coding */
.aqi-good {
    color: #00e400;
}

.aqi-fair {
    color: #ffff00;
}

.aqi-moderate {
    color: #ff7e00;
}

.aqi-poor {
    color: #ff0000;
}

.aqi-very-poor {
    color: #8f3f97;
}

/* Weather Summary Section */
.weather-summary {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
    animation: slideInLeft 0.8s ease-out;
    overflow: hidden;
    position: relative;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.weather-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.summary-header i {
    font-size: 1.8rem;
    color: var(--accent-secondary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.summary-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.summary-content {
    position: relative;
    z-index: 1;
}

.summary-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border-left: 4px solid var(--accent-secondary);
    animation: typeWriter 1s ease-out;
}

@keyframes typeWriter {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 100%;
        opacity: 1;
    }
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
    animation: fadeInScale 0.6s ease-out backwards;
}

.stat-item:nth-child(1) {
    animation-delay: 0.2s;
}

.stat-item:nth-child(2) {
    animation-delay: 0.4s;
}

.stat-item:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.stat-item i {
    font-size: 2rem;
    color: var(--accent-color);
}

.stat-item span {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Forecast Section */
.forecast-section {
    margin-top: 30px;
}

.forecast-section h3 {
    margin-bottom: 20px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.forecast-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    animation: popIn 0.5s ease-out backwards;
}

.forecast-card:nth-child(1) {
    animation-delay: 0.1s;
}

.forecast-card:nth-child(2) {
    animation-delay: 0.2s;
}

.forecast-card:nth-child(3) {
    animation-delay: 0.3s;
}

.forecast-card:nth-child(4) {
    animation-delay: 0.4s;
}

.forecast-card:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.forecast-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.forecast-card img {
    width: 60px;
    height: 60px;
}

.forecast-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
}

/* Loading & Error */
.loading {
    text-align: center;
    padding: 60px;
    animation: fadeIn 0.3s ease-out;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-message {
    text-align: center;
    background: rgba(255, 82, 82, 0.9);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    animation: shake 0.5s ease-out;
    box-shadow: var(--shadow-md);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .splash-title {
        font-size: 2rem;
    }

    .logo-section h1 {
        font-size: 1.5rem;
    }

    .current-weather {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .weather-details {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .detail-card {
        justify-content: center;
    }

    .temp-details h3 {
        font-size: 3rem;
    }

    .additional-info {
        grid-template-columns: 1fr;
    }

    .forecast-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}