/* ===== ROOMS PAGE CSS ===== */
/* Dedicated styling for /rooms and /rooms/{id} pages */

:root {
    --rooms-bg: #0a0a0f;
    --rooms-card-bg: rgba(255, 255, 255, 0.03);
    --rooms-border: rgba(255, 255, 255, 0.08);
    --rooms-text: #ffffff;
    --rooms-text-muted: rgba(255, 255, 255, 0.5);
    --rooms-accent: #0a84ff;
    --rooms-success: #32d74b;
    --rooms-danger: #ff453a;
    --rooms-warning: #ffd60a;

    /* Animation timing functions - Spring physics */
    --spring-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --spring-smooth: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-in-out-smooth: cubic-bezier(0.4, 0, 0.2, 1);

    /* Animation durations */
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--rooms-bg);
    color: var(--rooms-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================================
   SMOOTH ANIMATIONS - Native App Feel
   ============================================================================ */

/* View transition animations */
#roomsListView,
#roomCallView {
    transition: opacity var(--duration-normal) var(--ease-out-expo),
        transform var(--duration-normal) var(--ease-out-expo);
}

#roomsListView.hidden,
#roomCallView.hidden {
    opacity: 0;
    transform: translateX(-20px);
    pointer-events: none;
    position: absolute;
}

/* Page enter animation */
@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pageSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

.page-enter {
    animation: pageSlideIn var(--duration-normal) var(--ease-out-expo) forwards;
}

.page-exit {
    animation: pageSlideOut var(--duration-fast) var(--ease-in-out-smooth) forwards;
}

/* Skeleton loading animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.03) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-card {
    background: var(--rooms-card-bg);
    border: 1px solid var(--rooms-border);
    border-radius: 14px;
    padding: 16px;
    min-height: 120px;
}

.skeleton-card .skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.skeleton-card .skeleton-title {
    height: 18px;
    width: 70%;
    margin-bottom: 8px;
}

.skeleton-card .skeleton-meta {
    height: 14px;
    width: 50%;
}

/* Staggered animation for list items */
@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.room-card {
    animation: staggerFadeIn var(--duration-slow) var(--spring-bounce) backwards;
}

.room-card:nth-child(1) {
    animation-delay: 0ms;
}

.room-card:nth-child(2) {
    animation-delay: 50ms;
}

.room-card:nth-child(3) {
    animation-delay: 100ms;
}

.room-card:nth-child(4) {
    animation-delay: 150ms;
}

.room-card:nth-child(5) {
    animation-delay: 200ms;
}

.room-card:nth-child(6) {
    animation-delay: 250ms;
}

.room-card:nth-child(7) {
    animation-delay: 300ms;
}

.room-card:nth-child(8) {
    animation-delay: 350ms;
}

/* Participant card stagger */
.participant-card {
    animation: staggerFadeIn var(--duration-slow) var(--spring-bounce) backwards;
}

.participant-card:nth-child(1) {
    animation-delay: 0ms;
}

.participant-card:nth-child(2) {
    animation-delay: 80ms;
}

.participant-card:nth-child(3) {
    animation-delay: 160ms;
}

.participant-card:nth-child(4) {
    animation-delay: 240ms;
}

.participant-card:nth-child(5) {
    animation-delay: 320ms;
}

/* Button press effect - scale down on active */
.create-btn,
.join-btn,
.control-btn,
.max-btn,
.filter-chip,
.go-to-room-btn,
.btn-primary,
.btn-secondary,
.room-card {
    transition: transform var(--duration-fast) var(--spring-bounce),
        box-shadow var(--duration-normal) var(--ease-out-expo),
        background var(--duration-fast) var(--ease-in-out-smooth),
        border-color var(--duration-fast) var(--ease-in-out-smooth);
    will-change: transform;
}

.create-btn:active,
.join-btn:active,
.control-btn:active,
.max-btn:active,
.filter-chip:active,
.go-to-room-btn:active,
.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.95);
}

.room-card:active {
    transform: scale(0.98);
}

/* Icon morphing transition */
.control-btn i,
.room-card i {
    transition: transform var(--duration-normal) var(--spring-smooth);
}

.control-btn:hover i {
    transform: scale(1.1);
}

/* Smooth border-color transitions */
.participant-card,
.room-card,
.form-group input,
.form-group select {
    transition: border-color var(--duration-normal) var(--ease-out-expo),
        box-shadow var(--duration-normal) var(--ease-out-expo),
        transform var(--duration-fast) var(--spring-bounce),
        background var(--duration-fast) var(--ease-in-out-smooth);
}

/* Room state transitions */
.room-state {
    transition: opacity var(--duration-normal) var(--ease-out-expo),
        transform var(--duration-normal) var(--ease-out-expo);
}

.room-state.hidden {
    opacity: 0;
    transform: scale(0.95);
}

/* Toast slide-up animation with spring */
@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast {
    animation: toastSlideUp var(--duration-normal) var(--spring-bounce);
}

/* Smooth icon color transitions */
.toast i,
.back-link i,
.share-btn i {
    transition: color var(--duration-fast) var(--ease-in-out-smooth),
        transform var(--duration-fast) var(--spring-smooth);
}

/* Loading spinner with smoother animation */
@keyframes smoothSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading-state .loader {
    animation: smoothSpin 1s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

/* Join screen entrance */
.join-state {
    animation: pageSlideIn var(--duration-slow) var(--ease-out-expo);
}

/* Room icon bounce on join screen */
@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.room-preview .room-icon {
    animation: iconBounce 2s var(--ease-in-out-smooth) infinite;
}

/* ============================================================================
   ROOMS APP CONTAINER
   ============================================================================ */

.rooms-app,
.room-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================================
   HEADER
   ============================================================================ */

.rooms-header,
.room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--rooms-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.rooms-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--rooms-text);
    font-size: 18px;
    font-weight: 700;
}

.rooms-logo img {
    border-radius: 8px;
}

.rooms-badge {
    background: linear-gradient(135deg, #0a84ff, #5e5ce6);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.online-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--rooms-text-muted);
}

.online-dot {
    width: 8px;
    height: 8px;
    background: var(--rooms-success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

/* ============================================================================
   TOP BAR
   ============================================================================ */

.rooms-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.rooms-top-bar h1 {
    font-size: 24px;
    font-weight: 700;
}

.create-room-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0a84ff, #0066cc);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.create-room-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 132, 255, 0.4);
}

.create-room-toggle-btn i {
    width: 18px;
    height: 18px;
}

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */

.rooms-main {
    flex: 1;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================================================
   CREATE SECTION (Collapsible)
   ============================================================================ */

.create-section {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.1), rgba(94, 92, 230, 0.1));
    border: 1px solid rgba(10, 132, 255, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.create-section.collapsed {
    display: none;
}

.create-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.create-section-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.collapse-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: var(--rooms-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collapse-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--rooms-text);
}

.collapse-btn i {
    width: 18px;
    height: 18px;
}

.create-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--rooms-text-muted);
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--rooms-border);
    border-radius: 10px;
    color: var(--rooms-text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
    color: var(--rooms-text-muted);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--rooms-accent);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

.form-group select option {
    background: #1a1a24;
    color: var(--rooms-text);
}

.max-people-selector {
    display: flex;
    gap: 8px;
}

.max-btn {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--rooms-border);
    border-radius: 8px;
    color: var(--rooms-text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.max-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.max-btn.active {
    background: var(--rooms-accent);
    border-color: var(--rooms-accent);
    color: white;
}

.create-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(135deg, var(--rooms-success), #28a745);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(50, 215, 75, 0.4);
}

.create-btn i {
    width: 20px;
    height: 20px;
}

/* ============================================================================
   CATEGORY FILTER
   ============================================================================ */

.category-filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-filter::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 10px 16px;
    background: var(--rooms-card-bg);
    border: 1px solid var(--rooms-border);
    border-radius: 20px;
    color: var(--rooms-text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--rooms-text);
}

.filter-chip.active {
    background: var(--rooms-accent);
    border-color: var(--rooms-accent);
    color: white;
}

/* ============================================================================
   MY ROOM SECTION
   ============================================================================ */

.my-room-section {
    background: linear-gradient(135deg, rgba(255, 214, 10, 0.1), rgba(255, 159, 10, 0.1));
    border: 1px solid rgba(255, 214, 10, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.my-room-section.hidden {
    display: none;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.close-room-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 69, 58, 0.15);
    border: 1px solid rgba(255, 69, 58, 0.3);
    border-radius: 8px;
    color: var(--rooms-danger);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.close-room-btn:hover {
    background: rgba(255, 69, 58, 0.25);
}

.close-room-btn i {
    width: 16px;
    height: 16px;
}

.my-room-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px;
}

.my-room-card .room-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.my-room-card .room-icon {
    font-size: 32px;
}

.my-room-card .room-details h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.my-room-card .room-details .meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--rooms-text-muted);
}

.my-room-card .room-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 12px;
}

.my-room-card .room-link input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--rooms-text);
    font-size: 13px;
    outline: none;
}

.my-room-card .copy-btn {
    padding: 8px 12px;
    background: var(--rooms-accent);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.my-room-card .go-to-room-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--rooms-success);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.my-room-card .go-to-room-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(50, 215, 75, 0.4);
}

/* ============================================================================
   ROOMS GRID
   ============================================================================ */

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Room Card */
.room-card {
    background: var(--rooms-card-bg);
    border: 1px solid var(--rooms-border);
    border-radius: 14px;
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.room-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.room-card.full {
    opacity: 0.6;
}

.room-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.room-card-icon {
    font-size: 28px;
}

.room-card-info {
    flex: 1;
}

.room-card-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.room-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--rooms-text-muted);
}

.room-card-category {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

.room-card-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--rooms-border);
}

.room-card-participants {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--rooms-text-muted);
}

.room-card-participants i {
    width: 16px;
    height: 16px;
}

.room-card-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.room-card-badge.live {
    background: rgba(50, 215, 75, 0.2);
    color: var(--rooms-success);
}

.room-card-badge.full {
    background: rgba(255, 255, 255, 0.1);
    color: var(--rooms-text-muted);
}

/* Empty State */
.rooms-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--rooms-text-muted);
}

.rooms-empty.hidden {
    display: none;
}

.rooms-empty i {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.rooms-empty p {
    font-size: 16px;
    font-weight: 500;
    color: var(--rooms-text);
    margin-bottom: 6px;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.rooms-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    font-size: 13px;
    color: var(--rooms-text-muted);
    border-top: 1px solid var(--rooms-border);
}

.rooms-footer a {
    color: var(--rooms-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.rooms-footer a:hover {
    color: var(--rooms-text);
}

/* ============================================================================
   ROOM PAGE STATES
   ============================================================================ */

.back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--rooms-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--rooms-text);
}

.back-link i {
    width: 18px;
    height: 18px;
}

.room-title {
    text-align: center;
}

.room-title .room-name {
    font-size: 16px;
    font-weight: 600;
}

.share-btn {
    width: 40px;
    height: 40px;
    background: var(--rooms-card-bg);
    border: 1px solid var(--rooms-border);
    border-radius: 10px;
    color: var(--rooms-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--rooms-text);
}

.share-btn i {
    width: 18px;
    height: 18px;
}

.room-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.room-state.hidden {
    display: none;
}

/* Loading */
.loading-state .loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--rooms-border);
    border-top-color: var(--rooms-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading-state p {
    color: var(--rooms-text-muted);
}

/* Not Found / Kicked / Full */
.not-found-state i,
.kicked-state i,
.full-state i {
    width: 64px;
    height: 64px;
    color: var(--rooms-text-muted);
    margin-bottom: 16px;
}

.not-found-state h2,
.kicked-state h2,
.full-state h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.not-found-state p,
.kicked-state p,
.full-state p {
    color: var(--rooms-text-muted);
    margin-bottom: 24px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #0a84ff, #0066cc);
    color: white;
}

.btn-secondary {
    background: var(--rooms-card-bg);
    border: 1px solid var(--rooms-border);
    color: var(--rooms-text);
}

/* Join State */
.room-preview {
    margin-bottom: 32px;
}

.room-preview .room-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.room-preview h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.room-preview .room-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--rooms-text-muted);
}

.room-preview .room-meta i {
    width: 16px;
    height: 16px;
}

.join-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 48px;
    background: linear-gradient(135deg, var(--rooms-success), #28a745);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.join-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(50, 215, 75, 0.4);
}

.join-btn i {
    width: 24px;
    height: 24px;
}

.join-note {
    font-size: 13px;
    color: var(--rooms-text-muted);
}

/* In Room State - Premium Design */
.in-room-state {
    padding: 20px;
    padding-bottom: 120px;
    /* Space for fixed control bar */
    min-height: calc(100vh - 80px);
    /* Subtle radial gradient background */
    background: radial-gradient(ellipse at 50% 30%,
            rgba(10, 132, 255, 0.08) 0%,
            transparent 50%),
        radial-gradient(ellipse at 80% 80%,
            rgba(94, 92, 230, 0.06) 0%,
            transparent 40%);
}

.participants-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    align-content: center;
    justify-content: center;
    padding: 24px;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================================================
   PREMIUM PARTICIPANT CARDS - Glassmorphism Design
   ============================================================================ */

.participant-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px;
    /* Glassmorphism effect */
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    position: relative;
    /* GPU acceleration for smooth animations */
    transform: translateZ(0);
    will-change: transform, box-shadow;
    transition: transform 0.2s var(--spring-bounce),
        box-shadow 0.3s var(--ease-out-expo),
        border-color 0.2s ease;
    /* Premium shadow */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.participant-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.participant-card:active {
    transform: scale(0.98);
}

.participant-card.speaking {
    border-color: var(--rooms-success);
    box-shadow: 0 0 40px rgba(50, 215, 75, 0.35),
        0 0 80px rgba(50, 215, 75, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.2);
    animation: speakingGlow 2s ease-in-out infinite;
}

@keyframes speakingGlow {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(50, 215, 75, 0.3),
            0 0 60px rgba(50, 215, 75, 0.1),
            0 8px 32px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 50px rgba(50, 215, 75, 0.5),
            0 0 100px rgba(50, 215, 75, 0.2),
            0 12px 40px rgba(0, 0, 0, 0.25);
    }
}

.participant-card.me {
    border-color: rgba(10, 132, 255, 0.5);
    background: rgba(10, 132, 255, 0.08);
}

/* Premium Avatar with Ring */
.participant-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 16px;
    position: relative;
    /* Outer ring effect */
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s var(--spring-bounce);
}

.participant-card:hover .participant-avatar {
    transform: scale(1.05);
}

/* Dynamic avatar backgrounds based on data-avatar attribute */
.participant-avatar[data-avatar="0"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.participant-avatar[data-avatar="1"] {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.participant-avatar[data-avatar="2"] {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.participant-avatar[data-avatar="3"] {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.participant-avatar[data-avatar="4"] {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.participant-avatar[data-avatar="5"] {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}

.participant-avatar[data-avatar="6"] {
    background: linear-gradient(135deg, #d299c2, #fef9d7);
}

.participant-avatar[data-avatar="7"] {
    background: linear-gradient(135deg, #89f7fe, #66a6ff);
}

/* Default gradient for "me" */
.participant-card.me .participant-avatar {
    background: linear-gradient(135deg, #0a84ff, #5e5ce6);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.3),
        0 4px 20px rgba(10, 132, 255, 0.4);
}

/* Waveform animation for speaking - multiple rings */
.participant-card.speaking .participant-avatar::before,
.participant-card.speaking .participant-avatar::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--rooms-success);
    animation: waveformRing 1.5s ease-out infinite;
    pointer-events: none;
}

.participant-card.speaking .participant-avatar::after {
    inset: -16px;
    animation-delay: 0.5s;
}

@keyframes waveformRing {
    0% {
        transform: scale(0.85);
        opacity: 1;
    }

    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

/* Typography */
.participant-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.participant-role {
    font-size: 12px;
    color: var(--rooms-text-muted);
    font-weight: 500;
}

.participant-role.owner {
    color: var(--rooms-warning);
    font-weight: 600;
}

.participant-muted {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--rooms-danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.participant-muted i {
    width: 14px;
    height: 14px;
    color: white;
}

.kick-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(255, 69, 58, 0.2);
    border: none;
    border-radius: 6px;
    color: var(--rooms-danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.participant-card:hover .kick-btn {
    opacity: 1;
}

.kick-btn i {
    width: 14px;
    height: 14px;
}

/* ============================================================================
   PREMIUM CONTROL BAR - Floating Glass Design
   ============================================================================ */

.room-controls {
    position: fixed;
    bottom: 100px;
    /* Raised to make room for bottom ads */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    /* Glassmorphism */
    background: rgba(30, 30, 35, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    /* Premium shadow */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    z-index: 100;
}

.control-btn {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: var(--rooms-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* GPU acceleration */
    transform: translateZ(0);
    will-change: transform, background;
    transition: transform 0.15s var(--spring-bounce),
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.08);
}

.control-btn:active {
    transform: scale(0.92);
}

.control-btn i {
    width: 24px;
    height: 24px;
}

/* Mute Button States */
.control-btn.mute-btn {
    background: rgba(50, 215, 75, 0.15);
    border-color: rgba(50, 215, 75, 0.3);
}

.control-btn.muted {
    background: rgba(255, 69, 58, 0.9);
    border-color: rgba(255, 69, 58, 1);
    box-shadow: 0 0 20px rgba(255, 69, 58, 0.4);
}

/* Leave Button */
.control-btn.leave-btn {
    background: rgba(255, 69, 58, 0.15);
    border-color: rgba(255, 69, 58, 0.3);
    color: var(--rooms-danger);
}

.control-btn.leave-btn:hover {
    background: rgba(255, 69, 58, 0.9);
    border-color: var(--rooms-danger);
    color: white;
}

/* Hand Raise Button */
.control-btn.hand-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.control-btn.hand-btn.raised {
    background: rgba(255, 214, 10, 0.9);
    border-color: var(--rooms-warning);
    color: #000;
    box-shadow: 0 0 24px rgba(255, 214, 10, 0.5);
    animation: handPulse 1s ease-in-out infinite;
}

@keyframes handPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

/* Hand Raise Indicator on Participant Cards */
.participant-hand {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ffd60a, #ffb700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(255, 214, 10, 0.4);
    animation: handWave 0.5s ease-in-out infinite alternate;
}

@keyframes handWave {
    from {
        transform: rotate(-10deg) scale(1);
    }

    to {
        transform: rotate(10deg) scale(1.05);
    }
}

/* Participant card with raised hand */
.participant-card.hand-raised {
    border-color: rgba(255, 214, 10, 0.5);
    box-shadow: 0 0 30px rgba(255, 214, 10, 0.25),
        0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Owner Controls */
.owner-controls {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: rgba(255, 214, 10, 0.2);
    border: 1px solid rgba(255, 214, 10, 0.3);
    border-radius: 20px;
}

.owner-controls.hidden {
    display: none;
}

.owner-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--rooms-warning);
}

/* ============================================================================
   TOAST
   ============================================================================ */

.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid var(--rooms-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast i {
    width: 18px;
    height: 18px;
    color: var(--rooms-success);
}

.toast.error i {
    color: var(--rooms-danger);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 600px) {
    .rooms-top-bar {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .create-room-toggle-btn {
        width: 100%;
    }

    .form-row {
        flex-direction: column;
    }

    .rooms-grid {
        grid-template-columns: 1fr;
    }

    .category-filter {
        gap: 6px;
    }

    .filter-chip {
        padding: 8px 12px;
        font-size: 12px;
    }

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

    .join-btn {
        padding: 16px 36px;
        font-size: 16px;
    }

    .room-preview .room-icon {
        font-size: 48px;
    }

    .room-preview h2 {
        font-size: 20px;
    }
}