@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    display: flex;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%239C92AC" fill-opacity="0.05" fill-rule="nonzero"><circle cx="30" cy="30" r="1.5"/></g></svg>');
    pointer-events: none;
    z-index: -1;
}

/* Join Form */
.join-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideUp 0.6s ease-out;
}

.join-form:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 4px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    text-align: center;
    margin-bottom: 36px;
    position: relative;
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: -0.025em;
}

.form-header h2 i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
}

.form-header p {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 28px;
    position: relative;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    color: #1f2937;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Ensure username input has same styling as room input */
#userNameInput {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    color: #1f2937;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group input:focus,
#userNameInput:focus {
    border-color: #667eea;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 4px 20px rgba(102, 126, 234, 0.15);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

.input-group input::placeholder,
#userNameInput::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.input-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.input-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.input-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.input-help {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.action-buttons {
    margin-top: 36px;
}

.join-button {
    width: 100%;
    padding: 20px 28px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.join-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.join-button:hover::before {
    left: 100%;
}

.join-button:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.15);
}

.join-button:active {
    transform: translateY(-1px);
}

.support-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 14px 24px;
    margin-top: 24px;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.support-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(102, 126, 234, 0.3);
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.support-btn i {
    color: #ef4444;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }
    
    .join-form {
        padding: 32px 24px;
        margin: 16px;
        max-width: 100%;
    }

    .form-header h2 {
        font-size: 1.3rem;
    }

    .input-group input,
    #userNameInput {
        padding: 14px 18px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .join-button {
        padding: 18px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .join-form {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .form-header h2 {
        font-size: 1.375rem;
    }
    
    .form-header p {
        font-size: 0.9rem;
    }

    .input-group input,
    #userNameInput {
        padding: 14px 16px;
        border-radius: 14px;
    }
    
    .join-button {
        padding: 16px 20px;
        border-radius: 14px;
    }
    
    .support-btn {
        border-radius: 14px;
        padding: 12px 20px;
    }
}

/* Add smooth transitions for mobile interactions */
@media (hover: none) and (pointer: coarse) {
    .join-button:hover {
        transform: none;
    }
    
    .input-group input:focus,
    #userNameInput:focus {
        transform: none;
    }
    
    .input-btn:hover {
        transform: translateY(-50%);
    }
} 