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

:root {
    --bg: #f0f4f9;
    --card-bg: #ffffff;
    --primary: #1a73e8;
    --primary-hover: #1557b0;
    --text: #202124;
    --text-secondary: #5f6368;
    --border: #dadce0;
    --input-bg: #f8f9fa;
    --success: #34a853;
    --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 8px;
}

body {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.header-title {
    font-size: 22px;
    font-weight: 400;
    color: var(--text);
}

/* Main content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px;
    gap: 48px;
}

/* Hero section */
.hero {
    text-align: center;
    max-width: 600px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text);
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Card */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 32px;
    width: 100%;
    max-width: 480px;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 18px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
    background: white;
}

input::placeholder {
    color: #9aa0a6;
}

/* Password toggle */
.password-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-wrapper span {
    font-size: 14px;
    color: var(--text-secondary);
}

.password-field {
    margin-top: 12px;
    display: none;
}

.password-field.visible {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: #9aa0a6;
    cursor: not-allowed;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Rooms list */
.rooms-section {
    width: 100%;
    max-width: 480px;
}

.rooms-section h2 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 16px;
}

.rooms-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.room-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.room-item:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.room-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.room-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

.room-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.room-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    background: #e8f0fe;
    color: var(--primary);
    font-weight: 500;
    white-space: nowrap;
}

.room-badge.locked {
    background: #fce8e6;
    color: #c5221f;
}

.no-rooms {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Error message */
.error-msg {
    color: #c5221f;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.error-msg.visible {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 13px;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .card { padding: 24px; }
    .main { padding: 32px 16px; }
}
