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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.search-section {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.search-box {
    display: flex;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 8px;
    box-shadow: var(--shadow);
    max-width: 700px;
    width: 100%;
    align-items: center;
}

.address-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 20px;
    font-size: 16px;
    background: transparent;
    color: var(--text-color);
}

.address-input::placeholder {
    color: var(--secondary-color);
    opacity: 0.7;
}

.search-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: var(--primary-dark);
}

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

.search-button.loading .button-text {
    opacity: 0;
}

.search-button.loading .spinner {
    display: block;
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
}

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

.map-container {
    position: relative;
    height: 600px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: fadeIn 1s ease-out 0.4s both;
}

.map {
    height: 100%;
    width: 100%;
    border-radius: 20px;
}

.state-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    max-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 1000;
}

.state-info.show {
    transform: translateX(0);
    opacity: 1;
}

.state-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.address-text {
    color: var(--secondary-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.coordinates {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    font-size: 0.85rem;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
}

.pulse {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    70% {
        box-shadow: 0 0 0 30px rgba(37, 99, 235, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
        transform: scale(1);
    }
}

.loading-overlay p {
    color: var(--text-color);
    font-size: 1.1rem;
}

.instructions {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.instructions h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.instructions ul {
    list-style: none;
    padding-left: 0;
}

.instructions li {
    margin-bottom: 10px;
    color: var(--secondary-color);
    font-size: 0.95rem;
    position: relative;
    padding-left: 25px;
}

.instructions li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .search-box {
        flex-direction: column;
    }

    .address-input {
        border-bottom: 1px solid var(--border-color);
    }

    .search-button {
        width: 100%;
        margin-top: 8px;
    }

    .map-container {
        height: 400px;
    }

    .state-info {
        top: auto;
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
        transform: translateY(100%);
    }

    .state-info.show {
        transform: translateY(0);
    }
}
