/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a1a;
    color: #fff;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Buttons */
button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #45a049;
}

button:disabled {
    background: #666;
    cursor: not-allowed;
}

/* Landing Page */
#landing {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    flex-direction: column;
    gap: 20px;
}

#landing h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

#landing p {
    color: #aaa;
    margin-bottom: 20px;
}

/* Room Type Selection */
#roomTypes {
    max-width: 900px;
    margin: 0 auto;
}

#roomTypes h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #4CAF50;
}

.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.room-card {
    background: #2d2d2d;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.room-card:hover {
    border-color: #4CAF50;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
}

.room-card.selected {
    border-color: #4CAF50;
    background: #3d3d3d;
}

.room-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.room-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #fff;
}

.room-card p {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.4;
}

/* Room Page */
#room {
    display: none;
    flex-direction: column;
    height: 100vh;
}

#header {
    background: #2d2d2d;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#timer {
    font-size: 2rem;
    font-weight: bold;
    color: #4CAF50;
}

#main {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px;
}

/* Video Area */
#videoArea {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#speaker {
    flex: 2;
    background: #000;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

#speaker video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#speakerName {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1.1rem;
}

#audience {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.audience-video {
    background: #000;
    border-radius: 8px;
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.audience-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audience-name {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Sidebar */
#sidebar {
    width: 300px;
    background: #2d2d2d;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#queue {
    flex: 1;
}

#queue h3 {
    margin-bottom: 15px;
    color: #4CAF50;
}

.queue-item {
    background: #3d3d3d;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.queue-item.active {
    background: #4CAF50;
    color: #000;
}

.queue-position {
    background: #555;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.queue-item.active .queue-position {
    background: #2d6b2f;
}

/* Controls */
#controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#skipBtn {
    background: #f44336;
}

#skipBtn:hover:not(:disabled) {
    background: #da190b;
}

#leaveBtn {
    background: #666;
}

#leaveBtn:hover {
    background: #555;
}

/* Utilities */
.hidden {
    display: none !important;
}

.room-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #444;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.room-duration {
    color: #4CAF50;
    font-weight: 600;
}

.room-users {
    color: #aaa;
}

#voteStartBtn {
    background: #2196F3;
}

#voteStartBtn:hover:not(:disabled) {
    background: #0b7dda;
}

#cameraToggleBtn, #micToggleBtn {
    background: #4CAF50;
}

#cameraToggleBtn:hover, #micToggleBtn:hover {
    background: #45a049;
}

#cameraToggleBtn.off, #micToggleBtn.off {
    background: #f44336;
}

#cameraToggleBtn.off:hover, #micToggleBtn.off:hover {
    background: #da190b;
}

#speaker {
    flex: 2;
    background-image: url('../images/conference.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

#speaker video {
    width: 10%;  /* Adjust this to make the head bigger/smaller */
    height: auto;
    aspect-ratio: 9/16;
    object-fit: cover;
    position: absolute;

    #speaker.conference {
        background-image: url('../images/conference.jpg');
    }

    #speaker.stage {
        background-image: url('../images/stage.jpg');
    }

    #speaker.concert {
        background-image: url('../images/concert.jpg');
    }

    #speaker.classroom {
        background-image: url('../images/classroom.jpg');
    }

    #speaker.casual {
        background-image: url('../images/casual.jpg');
    }

    /* Position the video on the stage - ADJUST THESE VALUES */
    left: 50%;
    top: 30%;  /* Adjust: higher % = lower on screen */
    transform: translate(-50%, -50%);

    border-radius: 8px;
    border: 3px solid rgba(76, 175, 80, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}