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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.header p {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Ad Spaces */
.ad-banner {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    text-align: center;
    margin: 20px 0;
    border-radius: 10px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-weight: 500;
    /* Overflow control to prevent ads from overflowing */
    overflow: hidden;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure all child elements within ad-banner respect container bounds */
.ad-banner * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Specific styling for Google AdSense containers */
.ad-banner .code-block {
    max-width: 100%;
    overflow: hidden;
}

.ad-banner div[id*="hospital"] {
    max-width: 100%;
    overflow: hidden;
}

/* Main Content Card */
.content-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 30px 0;
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    font-weight: bold;
    color: #6c757d;
    position: relative;
}

.step.active {
    background: #667eea;
    color: white;
}

.step.completed {
    background: #28a745;
    color: white;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 2px;
    background: #e9ecef;
}

.step.completed:not(:last-child)::after {
    background: #28a745;
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 600;
}

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

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
}

select, input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

select:focus, input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* State selection dropdown styling */
#state {
    border: 3px solid #ff6b35;
    background: linear-gradient(135deg, #fff 0%, #fff8f5 100%);
    font-weight: 600;
    color: #2c3e50;
    /* Custom bigger arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ff6b35' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5rem 1.5rem;
    padding-right: 3.5rem;
}

#state:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
    background: white;
}

/* Category selection dropdown styling - Same as state */
#category {
    border: 3px solid #ff6b35;
    background: linear-gradient(135deg, #fff 0%, #fff8f5 100%);
    font-weight: 600;
    color: #2c3e50;
    /* Custom bigger arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ff6b35' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5rem 1.5rem;
    padding-right: 3.5rem;
}

#category:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
    background: white;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 20px 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

.btn-secondary {
    background: #6c757d;
}

.btn-download {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    font-size: 1.2rem;
    padding: 20px 50px;
}

/* Loading Animation */
.loading {
    text-align: center;
    margin: 30px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error Message */
.error-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .content-card {
        padding: 25px;
        margin: 15px 0;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .step {
        width: 35px;
        height: 35px;
        margin: 0 5px;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    /* Enhanced state dropdown for mobile */
    #state {
        padding: 20px;
        padding-right: 3rem; /* Adjust space for smaller arrow */
        font-size: 1.2rem;
        border: 4px solid #ff6b35;
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
        background-size: 1.2rem 1.2rem;
        background-position: right 1rem center;
    }
    
    #state:focus {
        box-shadow: 0 0 0 5px rgba(255, 107, 53, 0.3);
    }

    /* Enhanced category dropdown for mobile - Same as state */
    #category {
        padding: 20px;
        padding-right: 3rem; /* Adjust space for smaller arrow */
        font-size: 1.2rem;
        border: 4px solid #ff6b35;
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
        background-size: 1.2rem 1.2rem;
        background-position: right 1rem center;
    }
    
    #category:focus {
        box-shadow: 0 0 0 5px rgba(255, 107, 53, 0.3);
    }

    .popup {
        padding: 20px;
        width: 95%;
    }

    .btn-download {
        padding: 15px 30px;
        font-size: 1.1rem;
    }

    .preview-box {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .content-card {
        padding: 20px;
    }
    
    .step {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 10px 25px;
        margin: 10px 5px;
    }
    
    /* Extra emphasis for very small screens */
    #state {
        padding: 22px;
        padding-right: 3rem; /* Adjust space for smaller arrow */
        font-size: 1.3rem;
        border: 5px solid #ff6b35;
        font-weight: 700;
        background-size: 1.2rem 1.2rem;
        background-position: right 1rem center;
    }

    /* Extra emphasis for category dropdown on very small screens */
    #category {
        padding: 22px;
        padding-right: 3rem; /* Adjust space for smaller arrow */
        font-size: 1.3rem;
        border: 5px solid #ff6b35;
        font-weight: 700;
        background-size: 1.2rem 1.2rem;
        background-position: right 1rem center;
    }
}

/* Sidebar Ad */
.sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    z-index: 100;
}

@media (max-width: 1400px) {
    .sidebar {
        display: none;
    }
}

.feature-list {
    list-style: none;
    text-align: left;
    margin: 30px 0;
}

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.feature-list li:before {
    content: '✓';
    color: #28a745;
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.2rem;
}

.preview-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.preview-box h4 {
    color: #495057;
    margin-bottom: 15px;
}

.hospital-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(5px);
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close-popup:hover {
    color: #333;
}
