.home-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}

.home-card {
    background: var(--panel);
    border-radius: 20px;
    padding: 48px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(43, 28, 30, 0.1);
    position: relative;
}

.theme-toggle-container {
    position: absolute;
    top: 24px;
    right: 24px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 48px;
}

.home-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-subtitle {
    font-size: 18px;
    color: var(--muted);
    margin: 16px 0 0 0;
}

.action-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.action-card {
    background: rgba(43, 28, 30, 0.02);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(43, 28, 30, 0.1);
    border-color: var(--accent);
}

.action-card h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 20px;
    color: var(--text);
    margin: 0 0 8px 0;
}

.action-card p {
    color: var(--muted);
    margin: 0 0 20px 0;
    font-size: 14px;
}

.join-room {
    display: flex;
    gap: 8px;
}

.join-room input {
    flex: 1;
}

.btn-primary {
    background: var(--good);
    color: white;
}

.btn-secondary {
    background: var(--good);
    color: white;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    text-align: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 28px;
    font-weight: 700;
    flex: 1;
    text-align: center;
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-content input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text);
    font-size: 16px;
    box-sizing: border-box;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(140, 63, 59, 0.2);
}

.modal-content .btn {
    width: 100%;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-content .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(43, 28, 30, 0.15);
}

.icon-btn {
    background: none;
    border: 2px solid rgba(164, 105, 91, 0.2);
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(164, 105, 91, 0.1);
    border-color: rgba(164, 105, 91, 0.3);
}

.rooms-list {
    max-height: 400px;
    overflow-y: auto;
}

.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    background: rgba(43, 28, 30, 0.02);
    transition: background-color 0.2s ease;
}

.room-item:hover {
    background: rgba(43, 28, 30, 0.05);
}

.room-info {
    flex: 0 0 80%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.room-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.2;
}

.room-status {
    font-size: 14px;
    color: var(--good);
    opacity: 0.9;
    font-weight: 500;
}

.join-room-btn {
    flex: 0 0 18%;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    min-width: 60px;
    max-width: 80px;
}

.loading-rooms {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    font-size: 14px;
    position: relative;
}

.loading-rooms::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.no-rooms,
.error-rooms {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 640px) {
    .action-section {
        grid-template-columns: 1fr;
    }
    
    .home-card {
        padding: 32px 24px;
    }
    
    .theme-toggle-container {
        position: static;
        margin-bottom: 24px;
        text-align: right;
    }
}
