:root {
    --primary-color: #4a6bff;
    --secondary-color: #3a56d4;
    --accent-color: #ff7e5f;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 5px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.5rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.icon-small {
    width: 70px;
    height: 70px;
    vertical-align: middle;
    margin-right: -1px;
    margin-left: -1px;
}

.logo span {
    font-weight: 800;
    color: var(--dark-color);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

nav a:hover {
    color: var(--primary-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero {
    text-align: center;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.app-description {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.app-description h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.app-description p {
    margin-bottom: 1rem;
}

.benefits, .how-to-use {
    margin-top: 1.5rem;
}

.benefits h3, .how-to-use h3 {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.benefits ul, .how-to-use ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.benefits li, .how-to-use li {
    margin-bottom: 0.5rem;
}

/* Weather Search Section */
.search-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 107, 255, 0.2);
}

.search-btn, .location-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-btn {
    background-color: var(--accent-color);
}

.search-btn:hover {
    background-color: var(--secondary-color);
}

.location-btn:hover {
    background-color: #e66a4a;
}

.error-message {
    color: #dc3545;
    margin-top: 0.5rem;
    display: none;
}

/* Weather Display */
.weather-display {
    display: none;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.location-info h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.location-info p {
    color: var(--gray-color);
}

.current-weather {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-icon {
    width: 80px;
    height: 80px;
}

.temperature {
    font-size: 3rem;
    font-weight: 700;
}

.weather-condition {
    font-size: 1.2rem;
    color: var(--gray-color);
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.detail-card {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.detail-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(74, 107, 255, 0.1);
    border-radius: 50%;
}

.detail-info h4 {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 0.25rem;
}

.detail-info p {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Loading Indicator */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 1rem 1.5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: #adb5bd;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-column ul li a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #495057;
    color: #adb5bd;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    nav {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        gap: 1rem;
        box-shadow: var(--box-shadow);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: var(--transition);
    }

    nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .weather-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .current-weather {
        width: 100%;
        justify-content: space-between;
    }

    .search-form {
        flex-direction: column;
    }

    .search-btn, .location-btn {
        width: 100%;
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}