:root {
    --topColor: #FFF9F9;
    --bottomColor: rgba(255, 183, 183, 0.20);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--topColor) 50%, var(--bottomColor) 50%);
}

.nav-container {
    background: linear-gradient(45deg, #0D0000, #430000);
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.logo {
    display: flex;
}

.red, .blue, .green {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 6px;
}

.red { background: red; }
.blue { background: #004CFF; }
.green { background: #00AD3F; }

.logo-name {
    color: #fff;
    margin-left: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 22px;
}

#replay-tour-btn {
    margin-left: auto;
    margin-right: 40px;
    background: none;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50px;
    padding: 6px 16px;
    color: rgba(255,255,255,0.75);
    font-family: 'Montserrat';
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

#replay-tour-btn:hover {
    border-color: #fff;
    color: #fff;
}

.main {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

#chat-list-container {
    width: 100%;
    max-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 20px 24px 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-family: 'Poppins', sans-serif;
    color: #430000;
}

.title-button-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

h3 {
    font-size: 18px;
    margin: 0;
}

.btn {
    width: 44px;
    height: 44px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    flex-shrink: 0;
}

.btn span {
    font-size: 32px;
    font-weight: bold;
    color: #5A5A5A;
    line-height: 1;
}

.center-no-table {
    text-align: center;
}

table {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.room-col {
    display: flex;
    align-items: center;
}

.green-icon {
    width: 10px;
    height: 10px;
    border: 1px solid #006625;
    border-radius: 50%;
    background: #00AD3F;
    margin-right: 12px;
    flex-shrink: 0;
}

th {
    padding-bottom: 16px;
    text-align: center;
    font-size: 14px;
}

td {
    text-align: center;
    padding-bottom: 14px;
    font-size: 14px;
}

.join-button {
    cursor: pointer;
}

.join-button:hover {
    color: #430000;
    font-weight: bold;
}

#join-room-container {
    width: 100%;
    max-width: 460px;
    border-radius: 24px;
    padding: 28px 32px 24px;
    font-family: 'Poppins', sans-serif;
    background-color: #fff;
    color: #5A5A5A;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.12);
    position: relative;
}

.title-new-room {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 28px;
    margin-top: 8px;
}

.back-icon {
    position: absolute;
    top: 24px;
    left: 24px;
    cursor: pointer;
}

.new-chat-input {
    margin-bottom: 4px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.chat-room-label {
    margin-top: 12px;
}

input {
    outline: none;
    border: none;
    border-bottom: 1px solid #707070;
    margin-bottom: 10px;
    width: 100%;
    padding: 6px 4px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    background: transparent;
}

.submit-btn {
    margin: 20px auto 0 auto;
    border: none;
    outline: none;
    background: #645B5B;
    width: 140px;
    height: 48px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    font-size: 18px;
    font-weight: bold;
    font-family: Montserrat, sans-serif;
    color: white;
}

.submit-btn.active {
    background: #430000;
}

.submit-btn.active:hover {
    background: #2d0000;
    transform: scale(1.04);
}

.display {
    display: none;
}

/* Tablet */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }

    .logo-name {
        font-size: 18px;
    }

    #chat-list-container {
        max-width: 100%;
    }

    #join-room-container {
        max-width: 100%;
        border-radius: 16px;
        padding: 24px 20px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .main {
        align-items: flex-start;
        padding: 16px 12px;
    }

    .logo-name {
        font-size: 16px;
    }

    th, td {
        font-size: 12px;
        padding-bottom: 10px;
    }

    .submit-btn {
        width: 120px;
        height: 44px;
        font-size: 16px;
    }
}
