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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

/* Header Styles */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease-in-out;
}

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

.header p {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Search Box Styles */
.search-box {
    margin-bottom: 30px;
    animation: fadeIn 1s ease-in-out;
}

.input-group {
    display: flex;
    gap: 10px;
    background: white;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 20px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    border-radius: 50px;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-btn:hover::before {
    width: 300px;
    height: 300px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

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

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Location Button Styles */
.location-btn {
    display: block;
    margin: 15px auto 0;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(17, 153, 142, 0.4);
}

.location-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Error Message Styles */
.error-message {
    background: #ff6b6b;
    color: white;
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s ease-in-out;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* Weather Card Styles */
.weather-card {
    background: white;
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.weather-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.location {
    text-align: center;
    margin-bottom: 20px;
}

.location h2 {
    font-size: 1.8rem;
    color: #667eea;
    font-weight: 600;
}

/* Main Weather Display */
.weather-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.weather-icon-container {
    flex-shrink: 0;
}

.weather-icon {
    width: 150px;
    height: 150px;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

.temperature {
    text-align: center;
}

.temperature h1 {
    font-size: 4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.description {
    font-size: 1.3rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.feels-like {
    font-size: 1rem;
    color: #666;
}

/* Weather Details Grid */
.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.detail-item i {
    font-size: 2rem;
    color: #667eea;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.detail-value {
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
}

/* Welcome Message Styles */
.welcome-message {
    background: white;
    border-radius: 25px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.welcome-message:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.welcome-message i {
    color: #667eea;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.welcome-message h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.welcome-message>p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 12px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature:hover {
    transform: scale(1.1);
    background: #f8f9ff;
}

.feature i {
    font-size: 2rem;
    color: #667eea;
}

.feature span {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Footer Styles */
.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
    font-size: 0.9rem;
    opacity: 0.95;
}

.footer p {
    margin: 5px 0;
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease, opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.8;
    border-bottom-color: white;
}

.footer i.fa-heart {
    color: #ff6b6b;
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes float {

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

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shake {

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

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Forecast Section Styles */
.forecast-section {
    margin-top: 30px;
    animation: fadeInUp 1s ease-in-out;
}

.forecast-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
}

.forecast-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.forecast-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.forecast-date {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 5px;
}

.forecast-icon img {
    width: 50px;
    height: 50px;
}

.forecast-temp {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin: 5px 0;
}

.forecast-desc {
    font-size: 0.8rem;
    color: #667eea;
    text-transform: capitalize;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE & TABLET
======================================== */

/* Tablet devices (601px to 900px) */
@media screen and (min-width: 601px) and (max-width: 900px) {
    .header h1 {
        font-size: 2.2rem;
    }

    .search-btn {
        padding: 12px 25px;
    }

    .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile devices (600px and down) */
@media screen and (max-width: 600px) {
    body {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .header p {
        font-size: 0.9rem;
    }

    /* FIX: Make search button normal size on mobile */
    .input-group {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
        border-radius: 20px;
    }

    .search-input {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.95rem;
        border-radius: 15px;
    }

    .search-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.95rem;
        border-radius: 15px;
    }

    /* Make weather cards more compact on mobile */
    .weather-card {
        padding: 20px;
        border-radius: 20px;
    }

    .weather-main {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .weather-icon {
        width: 120px;
        height: 120px;
    }

    .temperature h1 {
        font-size: 3rem;
    }

    .description {
        font-size: 1.1rem;
    }

    .weather-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .detail-item {
        padding: 12px;
        gap: 10px;
    }

    .detail-item i {
        font-size: 1.5rem;
    }

    .detail-label {
        font-size: 0.75rem;
    }

    .detail-value {
        font-size: 1rem;
    }

    .location h2 {
        font-size: 1.4rem;
    }

    /* Welcome message mobile */
    .welcome-message {
        padding: 30px 20px;
    }

    .welcome-message h2 {
        font-size: 1.5rem;
    }

    .welcome-message>p {
        font-size: 0.95rem;
    }

    .welcome-message i {
        font-size: 3. 5rem ! important;
    }

    .features {
        flex-direction: column;
        gap: 15px;
    }

    .feature {
        padding: 10px;
    }

    .footer {
        font-size: 0.85rem;
        padding: 15px;
    }
}

/* Extra small devices (400px and down) */
@media screen and (max-width: 400px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .temperature h1 {
        font-size: 2.5rem;
    }

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