/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #e94560;
    --text-color: #eee;
    --text-secondary: #ccc;
    --success-color: #00ff00;
    --warning-color: #ffff00;
    --danger-color: #ff0000;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    position: relative;
}

.header-content {
    position: relative;
}

.header-controls {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 15px;
    align-items: center;
}

.language-selector {
    /* Remove absolute positioning */
}

.language-select {
    padding: 8px 15px;
    background: var(--accent-color);
    color: var(--text-color);
    border: 2px solid var(--highlight-color);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    min-height: 40px;
}

.language-select:hover {
    background: var(--highlight-color);
    transform: translateY(-2px);
}

.language-select:focus {
    outline: none;
    border-color: #00d4ff;
}

/* User Menu */
.login-button {
    padding: 8px 20px;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.user-menu {
    position: relative;
}

.user-menu-button {
    padding: 8px 16px;
    background: var(--accent-color);
    color: var(--text-color);
    border: 2px solid var(--highlight-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-menu-button:hover {
    background: var(--highlight-color);
    transform: translateY(-2px);
}

.user-icon {
    font-size: 1.2rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--secondary-color);
    border: 2px solid var(--highlight-color);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    background: var(--highlight-color);
}

.dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 6px 6px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00d4ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star-icon {
    display: inline-block;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Search Section */
.search-section {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: var(--accent-color);
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.tab-button:hover {
    background: var(--highlight-color);
}

.tab-button.active {
    background: var(--highlight-color);
    font-weight: 600;
}

.search-form {
    display: none;
}

.search-form.active {
    display: block;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 15px;
    background: var(--accent-color);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
    min-height: 48px; /* Touch-friendly minimum */
}

.search-input:focus {
    outline: none;
    border-color: var(--highlight-color);
    background: var(--primary-color);
}

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

.coordinates-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.search-button {
    width: 100%;
    padding: 15px;
    background: var(--highlight-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px; /* Touch-friendly minimum */
}

.search-button:hover {
    background: #d63651;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(233, 69, 96, 0.3);
}

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

.search-icon {
    font-size: 1.2rem;
}

/* Location Info (shown after search) */
.location-info {
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    text-align: center;
}

.location-info h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--highlight-color);
    margin: 0 0 6px 0;
}

.location-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--highlight-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error Message */
.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    text-align: center;
}

/* Results Section */
.results-section {
    animation: fadeIn 0.5s ease-in-out;
}

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

.location-info {
    background: var(--secondary-color);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.location-info h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #00d4ff;
}

.location-info p {
    color: var(--text-secondary);
}

/* Summary Card */
.summary-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-item {
    background: var(--secondary-color);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

.summary-item h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quality-badge {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.summary-score {
    font-size: 2rem;
    font-weight: 700;
    color: #00d4ff;
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
}

.best-time {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border: 2px solid var(--highlight-color);
}

/* Moon Phase Card */
.moon-card {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    border: 2px solid #4a5568;
}

.moon-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #ffd700;
    text-align: center;
}

.moon-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 30px;
    align-items: center;
}

.moon-icon {
    font-size: 5rem;
    text-align: center;
}

.moon-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.moon-phase, .moon-illumination, .moon-impact {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.moon-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.moon-value {
    color: var(--text-color);
    font-weight: 700;
}

.moon-recommendation {
    margin-top: 10px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border-left: 4px solid #ffd700;
    border-radius: 4px;
}

.moon-recommendation p {
    color: var(--text-color);
    font-size: 0.95rem;
    margin: 0;
}

/* Bortle Scale / Light Pollution Card */
.bortle-card {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    border: 2px solid #4a5568;
}

.bortle-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #9d4edd;
    text-align: center;
}

.bortle-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 30px;
    align-items: center;
}

.bortle-badge {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 12px;
    min-width: 120px;
}

.bortle-class {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 10px;
}

.bortle-emoji {
    font-size: 2.5rem;
}

.bortle-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bortle-name, .bortle-quality, .bortle-magnitude {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bortle-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.bortle-value {
    color: var(--text-color);
    font-weight: 700;
}

.bortle-description {
    margin-top: 10px;
    padding: 12px;
    background: rgba(157, 78, 221, 0.1);
    border-left: 4px solid #9d4edd;
    border-radius: 4px;
}

.bortle-description p {
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.bortle-recommendation {
    margin-top: 10px;
    padding: 15px;
    background: rgba(157, 78, 221, 0.15);
    border-left: 4px solid #9d4edd;
    border-radius: 4px;
}

.bortle-recommendation p {
    color: var(--text-color);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 600;
}

/* Astronomical Events */
.events-container {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.events-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #00d4ff;
    text-align: center;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.events-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.event-card {
    background: var(--accent-color);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid;
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.event-card.iss {
    border-left-color: #4facfe;
}

.event-card.meteor {
    border-left-color: #ffd700;
}

.event-card.moon {
    border-left-color: #ffd700;
}

.event-card.solar {
    border-left-color: #ff6b6b;
}

.event-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.event-icon {
    font-size: 2rem;
}

.event-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.event-detail-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.event-detail-value {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.event-description {
    margin-top: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.event-countdown {
    display: inline-block;
    background: var(--highlight-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 8px;
}

/* Hourly Forecast */
.forecast-container {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.forecast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.forecast-title {
    font-size: 1.5rem;
    color: #00d4ff;
    margin: 0;
}

.toggle-button {
    padding: 10px 20px;
    background: var(--highlight-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-button:hover {
    background: #d63651;
    transform: translateY(-2px);
}

.hourly-forecast {
    display: grid;
    gap: 15px;
}

/* Multi-Day Forecast */
.multi-day-forecast {
    display: grid;
    gap: 25px;
}

.night-card {
    background: var(--accent-color);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--highlight-color);
}

.night-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.night-date {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00d4ff;
}

.night-moon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.night-moon-emoji {
    font-size: 2rem;
}

.night-moon-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.night-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.night-summary-item {
    text-align: center;
}

.night-summary-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.night-summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.night-hourly {
    display: grid;
    gap: 10px;
}

.forecast-item {
    background: var(--accent-color);
    padding: 20px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.forecast-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.forecast-time {
    text-align: center;
    min-width: 80px;
}

.forecast-time .time {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
}

.forecast-time .weather-icon {
    font-size: 2rem;
    margin-top: 5px;
}

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

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

.detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.forecast-score {
    text-align: center;
    min-width: 100px;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.score-rating {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Legend */
.legend {
    background: var(--secondary-color);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.legend h4 {
    margin-bottom: 15px;
    color: #00d4ff;
    text-align: center;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Card Dashboard Grid */
.card-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.card-dashboard:empty {
    display: none;
}

.card-load-error {
    min-height: 100px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-dashboard {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .container {
        padding: 10px;
    }

    .header {
        padding: 25px 15px;
    }

    .language-selector {
        position: static;
        margin-bottom: 15px;
        text-align: center;
    }

    .language-select {
        width: 100%;
        max-width: 200px;
    }

    .logo {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .search-section {
        padding: 20px 15px;
    }

    .coordinates-inputs {
        grid-template-columns: 1fr;
    }

    .summary-card {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .summary-item {
        padding: 20px;
    }

    .moon-card {
        padding: 20px;
    }

    .moon-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    .moon-icon {
        font-size: 3.5rem;
    }

    .moon-phase, .moon-illumination, .moon-impact {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .bortle-card {
        padding: 20px;
    }

    .bortle-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    .bortle-badge {
        margin: 0 auto;
    }

    .bortle-name, .bortle-quality, .bortle-magnitude {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .forecast-container {
        padding: 20px 15px;
    }

    .forecast-header {
        flex-direction: column;
        align-items: stretch;
    }

    .forecast-title {
        text-align: center;
        font-size: 1.3rem;
    }

    .toggle-button {
        width: 100%;
        padding: 12px;
    }

    .forecast-item {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    .forecast-time {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .forecast-details {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .detail-item {
        text-align: center;
    }

    .forecast-score {
        min-width: auto;
        text-align: center;
    }

    .score-circle {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
        margin: 0 auto;
    }

    .night-summary {
        grid-template-columns: 1fr 1fr;
    }

    .events-container {
        padding: 20px 15px;
    }

    .events-title {
        font-size: 1.3rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .event-card {
        padding: 15px;
    }

    .event-detail-row {
        flex-direction: column;
        gap: 4px;
        text-align: left;
    }

    .legend {
        padding: 20px 15px;
    }

    .legend-items {
        grid-template-columns: 1fr;
    }
}

/* Extra small phones (iPhone SE, older Android) */
@media (max-width: 380px) {
    .logo {
        font-size: 1.5rem;
    }

    .summary-score {
        font-size: 1.5rem;
    }

    .summary-value {
        font-size: 1.5rem;
    }

    .moon-icon {
        font-size: 3rem;
    }

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

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

    .night-summary {
        grid-template-columns: 1fr;
    }
}

/* Landscape mode on phones */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 15px;
    }

    .search-section {
        padding: 15px;
    }

    .summary-card {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

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

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--secondary-color);
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid var(--highlight-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-color);
    transform: scale(1.2);
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--highlight-color);
}

.auth-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.auth-tab.active {
    color: #00d4ff;
    border-bottom-color: #00d4ff;
}

.auth-tab:hover {
    color: var(--text-color);
}

/* Auth Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    color: var(--text-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

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

.form-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: var(--accent-color);
    color: var(--text-color);
    border: 2px solid var(--highlight-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group small {
    display: block;
    color: var(--text-secondary);
    margin-top: 5px;
    font-size: 0.85rem;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    padding: 12px;
    background: rgba(255, 77, 77, 0.15);
    border-left: 4px solid #ff4d4d;
    border-radius: 4px;
    color: #ff6b6b;
    margin-bottom: 15px;
}

/* Saved Locations List */
.saved-locations-list {
    max-height: 60vh;
    overflow-y: auto;
}

.saved-location-item {
    padding: 15px;
    background: var(--accent-color);
    border: 2px solid var(--highlight-color);
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.saved-location-item:hover {
    background: var(--highlight-color);
    transform: translateX(5px);
}

.location-info {
    flex: 1;
}

.location-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.location-coords {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.location-actions {
    display: flex;
    gap: 10px;
}

.location-action-btn {
    padding: 8px 12px;
    background: var(--highlight-color);
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.location-action-btn:hover {
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #ffd700;
}

.delete-btn:hover {
    color: #ff4d4d;
}

/* Save Current Location Button */
.save-location-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.save-location-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: var(--transition);
}

.save-location-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* Loading state */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Mobile responsive for modals */
@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
        width: 95%;
    }

    .save-location-container {
        bottom: 20px;
        right: 20px;
    }

    .save-location-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Notification Settings Modal */
.notification-settings-modal {
    max-width: 450px;
}

.notification-settings-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--highlight-color);
}

.notification-settings-modal .modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-color);
}

.notification-settings-modal .close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.notification-settings-modal .close-btn:hover {
    color: var(--text-color);
}

.location-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--accent-color);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.location-icon {
    font-size: 1.3rem;
}

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

.toggle-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.toggle-text {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.toggle-switch {
    position: relative;
    width: 56px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--highlight-color);
    transition: var(--transition);
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: var(--text-secondary);
    transition: var(--transition);
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #00d4ff, #00ff88);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
    background-color: var(--primary-color);
}

.setting-description {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.threshold-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-color);
}

.threshold-value {
    font-size: 1.1rem;
    color: #00d4ff;
    font-weight: 700;
}

.threshold-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--highlight-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.threshold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.4);
    transition: var(--transition);
}

.threshold-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.threshold-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.4);
}

.threshold-slider:disabled {
    opacity: 0.5;
}

.threshold-slider:disabled::-webkit-slider-thumb {
    cursor: not-allowed;
}

.test-group {
    padding-top: 15px;
    border-top: 1px solid var(--highlight-color);
}

.test-email-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    color: var(--text-color);
    border: 2px solid var(--highlight-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.test-email-btn:hover {
    background: var(--highlight-color);
    border-color: #00d4ff;
}

.test-email-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.notification-settings-modal .modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--highlight-color);
}

.btn-secondary {
    flex: 1;
    padding: 12px 20px;
    background: var(--accent-color);
    color: var(--text-color);
    border: 2px solid var(--highlight-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--highlight-color);
}

.btn-primary {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

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

.notification-badge {
    margin-left: 8px;
    font-size: 0.9rem;
}

.notification-badge.active {
    color: #00d4ff;
}

.notification-threshold {
    font-size: 0.8rem;
    color: #00d4ff;
    margin-top: 4px;
}

/* Mobile responsive for notification modal */
@media (max-width: 768px) {
    .notification-settings-modal {
        width: 95%;
    }

    .notification-settings-modal .modal-footer {
        flex-direction: column;
    }
}

/* Admin Panel Styles */
.admin-modal {
    max-width: 700px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--accent-color);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--highlight-color);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00d4ff;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-search {
    margin-bottom: 15px;
}

.admin-search-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--accent-color);
    border: 2px solid var(--highlight-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
}

.admin-search-input:focus {
    outline: none;
    border-color: #00d4ff;
}

.admin-search-input::placeholder {
    color: var(--text-secondary);
}

.admin-users-list {
    max-height: 400px;
    overflow-y: auto;
}

.user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--accent-color);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.user-row:hover {
    border-color: var(--highlight-color);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-email {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.admin-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #ffd700;
    color: #1a1a2e;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.you-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #00d4ff;
    color: #1a1a2e;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.user-actions {
    display: flex;
    gap: 6px;
}

.action-btn {
    padding: 8px 10px;
    background: var(--secondary-color);
    border: 1px solid var(--highlight-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--highlight-color);
    transform: scale(1.1);
}

.action-btn.delete:hover {
    background: #e94560;
}

.action-btn.promote:hover {
    background: #ffd700;
}

.action-btn.demote:hover {
    background: #ff9900;
}

.action-btn.reset:hover {
    background: #00d4ff;
}

.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--accent-color);
}

.pagination-btn {
    padding: 8px 16px;
    background: var(--accent-color);
    border: 1px solid var(--highlight-color);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--highlight-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#adminPageInfo {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.admin-loading {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.admin-error {
    text-align: center;
    padding: 20px;
    color: #e94560;
    background: rgba(233, 69, 96, 0.1);
    border-radius: 8px;
}

.admin-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Mobile responsive for admin panel */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-row {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .user-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .admin-modal {
        max-width: 95%;
    }
}

/* ==========================================
   City Selection Modal (Disambiguation)
   ========================================== */

.city-select-modal {
    max-width: 500px;
}

.city-select-info {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.city-select-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.city-select-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--accent-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.city-select-item:hover {
    background: var(--highlight-color);
    transform: translateX(5px);
}

.city-select-item:focus {
    outline: none;
    border-color: #00d4ff;
}

.city-select-name {
    font-weight: 600;
    font-size: 1rem;
}

.city-select-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

.city-select-coords {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}

/* Scrollbar styling for city list */
.city-select-list::-webkit-scrollbar {
    width: 8px;
}

.city-select-list::-webkit-scrollbar-track {
    background: var(--secondary-color);
    border-radius: 4px;
}

.city-select-list::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.city-select-list::-webkit-scrollbar-thumb:hover {
    background: var(--highlight-color);
}

/* =============================================================================
   AI CHAT PANEL
   Slide-in drawer from the left. Trigger button fixed bottom-left.
   ============================================================================= */

/* ── Floating trigger button ─────────────────────────────────────────────── */
.ai-chat-trigger {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.45);
    transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
    line-height: 1;
}

.ai-chat-trigger:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 28px rgba(0, 212, 255, 0.65);
}

/* Hide trigger when panel slides in (panel covers the same corner) */
.ai-chat-trigger.panel-open {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.7);
}

/* ── Mobile backdrop ─────────────────────────────────────────────────────── */
.ai-chat-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1499;
    display: none;
    opacity: 0;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .ai-chat-backdrop.visible {
        display: block;
        opacity: 1;
    }
}

/* ── Panel container ─────────────────────────────────────────────────────── */
.ai-chat-panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 380px;
    max-width: 100vw;
    background: var(--secondary-color);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.55);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    /* Start off-screen to the left */
    transform: translateX(-100%);
    visibility: hidden;
    /* Slide-in animation; visibility delay lets the slide-out finish first */
    transition:
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0.35s;
    overflow: hidden;
}

.ai-chat-panel.open {
    transform: translateX(0);
    visibility: visible;
    transition:
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0s;
}

@media (max-width: 480px) {
    .ai-chat-panel { width: 100%; }
}

/* ── Panel header ────────────────────────────────────────────────────────── */
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    border-bottom: 1px solid rgba(0, 212, 255, 0.18);
    flex-shrink: 0;
}

.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    background: linear-gradient(45deg, #00d4ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-chat-title-icon {
    font-size: 1.25rem;
    /* Emoji needs its own colour – override the gradient clip */
    -webkit-text-fill-color: initial;
    filter: drop-shadow(0 0 5px rgba(0, 212, 255, 0.5));
}

.ai-chat-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease;
}

.ai-chat-close:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.08);
}

/* ── Messages scrollable area ────────────────────────────────────────────── */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.ai-chat-messages::-webkit-scrollbar { width: 6px; }
.ai-chat-messages::-webkit-scrollbar-track {
    background: var(--primary-color);
    border-radius: 3px;
}
.ai-chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

/* ── Individual message bubbles ──────────────────────────────────────────── */
.ai-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    animation: ai-message-in 0.25s ease both;
}

.ai-no-anim {
    animation: none;
}

@keyframes ai-message-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* User messages: avatar on the right, bubble aligned right */
.ai-message--user {
    flex-direction: row-reverse;
}

.ai-message-avatar {
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-bottom: 2px;
}

.ai-message-bubble {
    max-width: 86%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.6;
    word-break: break-word;
}

.ai-message--assistant .ai-message-bubble {
    background: var(--accent-color);
    color: var(--text-color);
    border-bottom-left-radius: 4px;
}

.ai-message--user .ai-message-bubble {
    background: linear-gradient(135deg,
        rgba(0, 212, 255, 0.12),
        rgba(0, 255, 136, 0.12));
    border: 1px solid rgba(0, 212, 255, 0.28);
    color: var(--text-color);
    border-bottom-right-radius: 4px;
}

/* Source attribution labels (📡 📖 ✏️) */
.ai-source-badge {
    display: inline-block;
    margin-top: 7px;
    margin-right: 8px;
    font-size: 0.75rem;
    color: #00d4ff;
    opacity: 0.8;
}

/* ── Typing / thinking indicator ─────────────────────────────────────────── */
.ai-typing-dots {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 3px 2px;
}

.ai-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00d4ff;
    opacity: 0.5;
    animation: ai-dot-pulse 1.4s infinite both;
}

.ai-typing-dots span:nth-child(1) { animation-delay: 0s;   }
.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-dot-pulse {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.35; }
    40%            { transform: scale(1.1); opacity: 1;    }
}

/* ── Suggestion chips ────────────────────────────────────────────────────── */
.ai-chat-suggestions {
    padding: 0 14px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    flex-shrink: 0;
}

.ai-chat-suggestions.ai-suggestions--hidden {
    display: none;
}

.ai-suggestion-chip {
    background: rgba(0, 212, 255, 0.09);
    border: 1px solid rgba(0, 212, 255, 0.28);
    color: #00d4ff;
    border-radius: 20px;
    padding: 6px 13px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.ai-suggestion-chip:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-1px);
}

/* Guest notice below chips */
.ai-guest-notice {
    width: 100%;
    font-size: 0.74rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 2px;
    opacity: 0.75;
}

/* ── Input area ──────────────────────────────────────────────────────────── */
.ai-chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--primary-color);
    flex-shrink: 0;
}

.ai-chat-input {
    flex: 1;
    background: var(--accent-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    min-height: 38px;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.45;
    transition: border-color 0.2s ease;
}

.ai-chat-input:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.45);
}

.ai-chat-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.ai-chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
    font-weight: 700;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ai-chat-send:hover  { transform: scale(1.1); }
.ai-chat-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}
