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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background with overlay */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.zingbus.com/blog/wp-content/uploads/2022/06/Best-Countries-to-Visit-in-the-neighbourhood-of-India.jpg') center/cover no-repeat;
    z-index: -2;
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 153, 51, 0.75) 0%, 
        rgba(233, 30, 99, 0.75) 30%,
        rgba(156, 39, 176, 0.8) 70%,
        rgba(63, 81, 181, 0.75) 100%);
    z-index: -1;
}

.main-container {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 32px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.25),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.4);
    padding: 50px;
    width: 100%;
    max-width: 680px;
    animation: slideUp 1s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #ff9933, #e91e63);
    border-radius: 2px;
}

.header h1 {
    color: #1a202c;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ff9933, #e91e63, #9c27b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -1px;
}

.header p {
    color: #2d3748;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.form-group {
    margin-bottom: 32px;
    position: relative;
}

.form-group label {
    display: block;
    color: #1a202c;
    font-weight: 800;
    margin-bottom: 12px;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.form-control {
    width: 100%;
    padding: 20px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.2);
    color: #1a202c;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    border-color: rgba(255, 153, 51, 0.8);
    box-shadow: 
        0 0 0 4px rgba(255, 153, 51, 0.2),
        0 8px 25px rgba(255, 153, 51, 0.15);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.3);
}

.form-control:hover {
    border-color: rgba(255, 153, 51, 0.6);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.25);
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 20px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 60px;
    appearance: none;
}

.btn {
    width: 100%;
    padding: 24px;
    background: linear-gradient(135deg, #ff9933, #e91e63, #9c27b0);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(255, 153, 51, 0.3);
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(255, 153, 51, 0.4);
    background-size: 300% 300%;
}

.btn:active:not(:disabled) {
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    margin: auto;
    border: 3px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.result {
    margin-top: 40px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    border-left: 6px solid #ff9933;
    display: none;
    animation: fadeInUp 0.6s ease-out;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.result.success {
    border-left-color: #48bb78;
    background: rgba(240, 255, 244, 0.25);
    backdrop-filter: blur(15px);
}

.result.error {
    border-left-color: #f56565;
    background: rgba(255, 245, 245, 0.25);
    backdrop-filter: blur(15px);
}

.audio-player {
    margin-top: 24px;
}

.audio-player audio {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.story-text {
    margin-top: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    font-style: italic;
    line-height: 1.7;
    color: #1a202c;
    font-size: clamp(0.9rem, 2vw, 1rem);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

.loading-text {
    text-align: center;
    color: #1a202c;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.1rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
}

.loading-text::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ff9933;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.city-examples {
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
    color: #2d3748;
    margin-top: 8px;
    font-style: italic;
    opacity: 0.9;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.success-title {
    color: #38a169 !important;
    margin-bottom: 20px !important;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-title {
    color: #e53e3e !important;
    margin-bottom: 15px !important;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Floating particles animation */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 15px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .container {
        padding: 30px 25px;
        margin: 0;
        border-radius: 24px;
        max-width: 100%;
    }

    .header {
        margin-bottom: 35px;
    }

    .form-group {
        margin-bottom: 25px;
    }

    .form-control {
        padding: 16px 20px;
    }

    .btn {
        padding: 20px;
        border-radius: 16px;
    }

    .result {
        padding: 24px;
        margin-top: 30px;
    }

    .story-text {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 10px;
        padding-top: 30px;
    }

    .container {
        padding: 25px 20px;
        border-radius: 20px;
    }

    .header {
        margin-bottom: 30px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-control {
        padding: 14px 18px;
    }

    .btn {
        padding: 18px;
    }

    .result {
        padding: 20px;
        margin-top: 25px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .container {
        background: rgba(255, 255, 255, 1);
        border: 2px solid #000;
    }

    .form-control {
        background: #fff;
        border-color: #000;
    }

    .btn {
        background: #000;
        color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
