@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    /* Primary Colors */
    --deep-blue: #1A237E;
    --royal-blue: #3949AB;
    --vibrant-teal: #00BFA5;
    --coral: #FF5252;
    --yellow: #FFD600;
    --success-green: #00E676;

    /* UI Palette */
    --bg-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --card-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-white: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.7);

    /* Spacing & Borders */
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-lg: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px var(--vibrant-teal);
    }

    50% {
        box-shadow: 0 0 20px var(--vibrant-teal);
    }

    100% {
        box-shadow: 0 0 5px var(--vibrant-teal);
    }
}

/* Layout Blocks */
.hidden {
    display: none !important;
}

header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.online-count {
    background: var(--vibrant-teal);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

/* Entry Screen */
#entry-screen {
    max-width: 450px;
    width: 90%;
    margin: auto;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.6s ease-out;
    text-align: center;
}

#entry-screen h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

#entry-screen p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 2rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    padding-left: 0.5rem;
}

input[type="text"] {
    width: 100%;
    padding: 1.2rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--vibrant-teal);
    background: rgba(255, 255, 255, 0.1);
}

.btn {
    width: 100%;
    padding: 1.2rem;
    border-radius: var(--radius-md);
    border: none;
    font-family: inherit;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--vibrant-teal);
    color: var(--deep-blue);
}

.btn-primary:hover {
    background: #00E5C1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 191, 165, 0.4);
}

.btn-secondary {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.modal {
    background: #2a3a5a;
    width: 90%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    text-align: center;
}

.modal h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.modal p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Chat Screen */
#chat-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.participant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.user-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.user-card.speaking {
    border-color: var(--vibrant-teal);
    animation: glow 1.5s infinite;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: var(--royal-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.user-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.mute-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--coral);
    font-size: 1.2rem;
}

/* Controls Header/Sticky Footer */
.controls-bar {
    position: sticky;
    bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
}

.control-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

#mute-btn {
    background: var(--success-green);
    color: white;
}

#mute-btn.muted {
    background: var(--coral);
    animation: pulse 2s infinite;
}

#copy-btn {
    background: white;
    color: var(--deep-blue);
}

@media (max-width: 600px) {
    .participant-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .user-card {
        padding: 1.5rem 1rem;
    }

    .user-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    main {
        padding: 1rem;
    }
}