/* 
 * IMPORTANT: Avoid global * resets - they break Zoom SDK UI
 * Scope all styles to .app container instead
 */

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Scope box-sizing to our app only */
.app,
.app * {
    box-sizing: border-box;
}

.app {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    padding: 40px 0 30px;
    color: #fff;
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.header p {
    opacity: 0.9;
}

.main {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.config-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.config-section h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #555;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #856404;
    margin-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #555;
}

.form-group input {
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.role-section h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.role-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.role-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.role-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.role-card.tutor:hover {
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.role-card.student:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.role-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.role-card h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.role-card p {
    color: #666;
    font-size: 0.9rem;
}

.form-section {
    padding-top: 10px;
}

.form-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.btn-back {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 0;
}

.btn-back:hover {
    text-decoration: underline;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-section {
    margin-top: 20px;
}

.status-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.status-message.info {
    background: #e7f3ff;
    border: 1px solid #b6d4fe;
    color: #084298;
}

.status-message.success {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.status-message.error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.hidden {
    display: none !important;
}

body.meeting-active .app {
    display: none !important;
}

body.meeting-active {
    background: #000 !important;
    min-height: 100dvh !important;
    height: 100dvh !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
}

html.meeting-active {
    height: 100dvh !important;
    overflow: visible !important;
}

#zmmtg-root {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    transform: scale(0.95) !important;
    transform-origin: top center !important;
}

.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
}

.footer a {
    color: #fff;
}

@media (max-width: 600px) {
    .form-row, .role-cards {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
}
