:root {
    --primary: #fe3c72;
    --primary-hover: #ff507c;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #ff7854;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

.text-gradient {
    background: linear-gradient(45deg, #fe3c72, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Hero Section */
.hero {
    height: 40vh;
    width: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg-dark) 0%, rgba(15, 23, 42, 0.4) 50%, rgba(15, 23, 42, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    width: 90%;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(45deg, #8b5cf6, #ec4899, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

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

/* Quiz Styles */
.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.quiz-option {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: rgba(254, 60, 114, 0.1);
    transform: translateX(5px);
}

.quiz-option.active {
    border-color: var(--accent);
    background: rgba(255, 120, 84, 0.1);
}

.vote-count {
    font-weight: 800;
    color: var(--accent);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.85rem;
}

/* Sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 90%;
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Glassmorphism Select/Dropdown */
.custom-select-wrapper {
    position: relative;
    margin-bottom: 3rem;
}

select {
    width: 100%;
    padding: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    color: var(--text-main);
    font-size: 1.1rem;
    appearance: none;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* Chat interface */
.chat-container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    font-size: 1rem;
    position: relative;
    animation: fadeIn 0.3s ease;
}

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

.message.sent {
    align-self: flex-end;
    background: var(--primary);
    border-bottom-right-radius: 0.25rem;
}

.message.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 0.25rem;
}

.message-user {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--accent);
}

.message-content img {
    max-width: 100%;
    border-radius: 0.75rem;
    margin-top: 0.5rem;
}

.message-content audio {
    width: 100%;
    min-width: 240px;
    margin-top: 0.5rem;
    display: block;
}

.chat-input-area {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    color: white;
    outline: none;
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.btn-icon:hover {
    color: var(--primary);
}

.btn-send {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-send:hover {
    background: var(--primary-hover);
}

/* View Once Styles */
.view-once-media {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    margin-top: 0.5rem;
}

.view-once-media:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.view-once-media i {
    font-size: 1.2rem;
    color: var(--primary);
}

.view-once-media span {
    font-size: 0.9rem;
    font-weight: 500;
}

.viewed-media {
    opacity: 0.5;
    cursor: default;
    background: rgba(255, 255, 255, 0.05);
}

.viewed-media:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
}

.viewed-media i {
    color: var(--text-muted);
}

/* Modal for View Once */
#view-once-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.98);
    z-index: 1000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

#view-once-modal img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 1rem;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

#view-once-modal .close-modal {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

#view-once-modal .close-modal:hover {
    opacity: 1;
}

.view-once-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--glass-border);
}

.view-once-toggle.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .chat-container { height: 600px; }
    .container { padding: 2rem 0; }
}

/* Total Responsive Layout Adjustments */
@media (max-width: 768px) {
    .container {
        width: 100% !important;
        padding: 2rem 1rem !important;
    }

    .hero h1 {
        font-size: 2.2rem !important;
        padding: 0 1rem;
    }
    
    .hero p {
        font-size: 0.9rem !important;
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 1.4rem !important;
        text-align: center;
    }
    
    .city-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .city-card {
        padding: 1.5rem !important;
    }

    /* Fixed inline styles overrides */
    header.hero {
        height: 30vh !important;
    }

    /* Quiz Responsive */
    .quiz-option {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .vote-count {
        align-self: flex-end !important;
        width: auto !important;
    }

    /* Chat Responsive */
    .chat-container {
        height: 500px !important;
        border-radius: 1rem !important;
    }

    .chat-header, .chat-messages, .chat-input-area {
        padding: 1rem !important;
    }

    .message {
        max-width: 90% !important;
    }

    .chat-input {
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem;
    }

    .btn-send {
        padding: 0.6rem 1rem !important;
    }

    /* Modal Responsive */
    #user-info-modal > div {
        padding: 1.5rem !important;
        border-radius: 1.5rem !important;
        width: 95% !important;
    }
}
