:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --primary-color: #0071e3; /* Apple Blue */
    --primary-hover: #0077ed;
    --secondary-color: rgba(255, 255, 255, 0.1);
    --secondary-hover: rgba(255, 255, 255, 0.15);
    --glass-bg: rgba(22, 22, 23, 0.7);
    --glass-border: rgba(255, 255, 255, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    line-height: 1.47;
    letter-spacing: -0.015em;
    font-weight: 200; /* Much thinner */
}

/* Index.php styles */
.container {
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    padding: 4rem 2rem;
    border-radius: 34px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--glass-border);
}

h1 {
    margin-bottom: 2.5rem;
    font-size: 2.8rem;
    font-weight: 200; /* Ultra thin */
    letter-spacing: -0.03em;
    color: var(--text-color);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

input[type="text"] {
    padding: 1.1rem 1.4rem;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 200;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    outline: none;
    text-align: center;
}

input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn {
    padding: 1.1rem 1.5rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 300;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    font-weight: 400; /* Slightly more visible for the main button */
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 113, 227, 0.2);
}

.btn-secondary {
    background-color: var(--secondary-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-1px);
}

.divider {
    color: rgba(255, 255, 255, 0.3);
    position: relative;
    font-size: 0.8rem;
    font-weight: 200;
    letter-spacing: 0.1em;
    margin: 0.5rem 0;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* Room.php styles */
.room-container {
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: #000;
    overflow: hidden;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.room-header h2 {
    font-size: 1rem;
    font-weight: 200;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.7);
}

.controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    background: rgba(22, 22, 23, 0.6);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    padding: 0.6rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    z-index: 1000;
    width: auto;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.controls .btn {
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
    border-radius: 14px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.controls .btn-primary {
    background: var(--primary-color);
}

.video-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    width: 100%;
    height: 100%;
}

#mainVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.status-overlay {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 200;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 50;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .controls {
        bottom: 1.5rem;
        padding: 0.4rem;
        gap: 0.3rem;
        width: 95%;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .controls .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.7rem;
    }

    .room-header {
        padding: 0.6rem 1rem;
    }

    .room-header .btn {
        display: none; /* Hide invite button on header to save space, maybe move to controls? */
    }
}
