body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
    padding-bottom: 40px; 
}

.audiochat-container {
    max-width: 900px !important; 
    text-align: left !important; 
    padding: 40px 20px;
}

.chat-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--surface-color);
    padding: 5px;
    border-radius: 16px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--border-light);
}

.chat-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.chat-tab:hover {
    color: var(--text-primary);
    background: var(--surface-secondary);
}

.chat-tab.active {
    background: var(--text-primary);
    color: var(--bg-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.audiochat-container h1 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 2.5rem;
}

.audiochat-container {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    margin-bottom: 40px;
}

.chat-settings {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-group label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-option {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--btn-text-border); 
    background: var(--btn-text-bg); 
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
}

body.light-theme .btn-option {
    background: var(--btn-text-bg);
    color: var(--text-primary);
    border: 1px solid var(--btn-text-border);
}

.btn-option:hover {
    background: var(--btn-text-hover-bg);
}

body.light-theme .btn-option:hover {
    background: var(--btn-text-hover-bg);
}

.btn-option.active {
    background: var(--text-primary);
    color: var(--bg-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); 
    border: 1px solid transparent;
}

body.light-theme .btn-option.active {
    background: var(--text-primary) !important; 
    color: var(--bg-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid transparent;
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    text-align: right;
    margin-top: 5px;
}

.full-width {
    grid-column: 1 / -1;
}

.btn-start {
    width: 100%;
    padding: 18px;
    border-radius: 30px;
    border: none;
    background: #32d74b;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.btn-start:hover {
    transform: translateY(-2px);
    background: #28c639;
    box-shadow: none; 
}

.btn-start:active {
    transform: translateY(1px);
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.05);
}

body.light-theme .back-button {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-theme .back-button:hover {
    background: rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .settings-row {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .audiochat-container {
        padding: 20px;
        padding-top: 60px; 
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-option {
        flex: 1 0 45%; 
    }
}

#searchLoader {
    display: none;
    text-align: center;
    padding: 40px;
}

.loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #32d74b;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.active-chat {
    display: none;
    flex-direction: column;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    align-items: center;
    justify-content: center;
}

.voice-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.voice-waves {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 60px;
}

.voice-waves span {
    display: block;
    width: 6px;
    height: 10px;
    background: #32d74b;
    border-radius: 3px;
    animation: wave 1s ease-in-out infinite;
}

.voice-waves span:nth-child(1) { animation-delay: 0.1s; }
.voice-waves span:nth-child(2) { animation-delay: 0.2s; }
.voice-waves span:nth-child(3) { animation-delay: 0.3s; }
.voice-waves span:nth-child(4) { animation-delay: 0.4s; }
.voice-waves span:nth-child(5) { animation-delay: 0.5s; }

@keyframes wave {
    0%, 100% { height: 10px; }
    50% { height: 40px; }
}

.chat-controls {
    position: absolute;
    bottom: 30px;
    display: flex;
    gap: 20px;
    z-index: 10;
}

.chat-controls button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.btn-report {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

.btn-report:hover {
    background: rgba(255, 193, 7, 0.25);
    border-color: #ffc107;
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
}

.btn-report::before {
    content: '⚠';
    font-size: 2rem;
    font-weight: bold;
}

.btn-stop {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

.btn-stop:hover {
    background: rgba(220, 53, 69, 0.25);
    border-color: #dc3545;
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.4);
}

.btn-stop::before {
    content: '●';
    font-size: 1.8rem;
}

.btn-mic {
    background: rgba(50, 215, 75, 0.15);
    color: #32d74b;
    border-color: rgba(50, 215, 75, 0.3);
}

.btn-mic:hover {
    background: rgba(50, 215, 75, 0.25);
    border-color: #32d74b;
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(50, 215, 75, 0.4);
}

.btn-mic.muted {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

.btn-mic.muted:hover {
    background: rgba(220, 53, 69, 0.25);
    border-color: #dc3545;
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.4);
}

.btn-mic.admin-muted {
    background: rgba(220, 53, 69, 0.08);
    color: rgba(220, 53, 69, 0.5);
    border-color: rgba(220, 53, 69, 0.15);
    cursor: not-allowed;
}

.btn-mic.admin-muted:hover {
    transform: none;
    box-shadow: none;
}

.chat-ended {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
}

.chat-ended p {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.btn-new-search, .btn-home, .btn-cancel {
    padding: 12px 30px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn-new-search {
    background: #32d74b;
    color: white;
}

.btn-home, .btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-new-search:hover, .btn-home:hover, .btn-cancel:hover {
    transform: translateY(-2px);
}

#reportModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#reportModal.active {
    display: flex;
}

.report-modal-content {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

body.light-theme .report-modal-content {
    background: var(--surface-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.report-modal-content h2 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.reason-option {
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--surface-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-weight: 500;
}

body.light-theme .reason-option {
    background: var(--surface-secondary);
    border-color: transparent;
}

.reason-option:hover {
    background: var(--btn-text-hover-bg);
    border-color: var(--border-color);
}

body.light-theme .reason-option:hover {
    background: var(--btn-text-hover-bg);
}

.reason-option.selected {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-color);
}

body.light-theme .reason-option.selected {
    background: var(--text-primary);
    color: var(--bg-color);
}

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

.report-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-report-only {
    background: var(--surface-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-report-only:hover {
    background: var(--btn-text-hover-bg);
}

.btn-report-and-end {
    background: var(--text-primary);
    color: var(--bg-color);
    border: 1px solid var(--text-primary);
}

.btn-report-and-end:hover {
    opacity: 0.9;
}

.btn-cancel-report {
    background: var(--surface-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-cancel-report:hover {
    background: var(--btn-text-hover-bg);
}

.btn-submit-report {
    background: var(--text-primary);
    color: var(--bg-color);
    border: 1px solid var(--text-primary);
}

.btn-submit-report:hover {
    opacity: 0.9;
}
