* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 16px;
}

.app-container {
    background: white;
    max-width: 400px;
    width: 100%;
    border-radius: 32px;
    padding: 24px 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.header p {
    color: #666;
    font-size: 15px;
}

.bot-prompt {
    background: linear-gradient(135deg, #f5f7ff 0%, #f0f3ff 100%);
    border-radius: 24px;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.bot-icon {
    background: white;
    width: 72px;
    height: 72px;
    border-radius: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.bot-prompt h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.bot-prompt p {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.btn-telegram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #27A7E7;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
    border: none;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.btn-telegram:hover {
    background: #1e96d4;
    transform: scale(0.98);
}

.btn-telegram svg {
    width: 20px;
    height: 20px;
}

.divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
    z-index: 1;
}

.divider span {
    background: white;
    padding: 0 16px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-left: 4px;
}

.form-group input {
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.2s;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
    font-size: 15px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    margin-top: 8px;
}

.btn-primary:hover {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: scale(0.96);
}

.info-text {
    text-align: center;
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 16px;
}

.info-text p {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 32px;
    padding: 32px 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.modal-header p {
    color: #666;
    font-size: 14px;
}

.otp-input-container {
    margin: 24px 0;
}

#otpInput {
    width: 100%;
    padding: 18px;
    font-size: 28px;
    text-align: center;
    letter-spacing: 8px;
    border: 3px solid #e0e0e0;
    border-radius: 20px;
    background: #f8f9fa;
    font-family: monospace;
    font-weight: 600;
    color: #1a1a1a;
    transition: all 0.2s;
}

#otpInput:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.timer {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin: 16px 0;
    font-family: monospace;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    font-size: 15px;
    font-weight: 500;
    margin-top: 16px;
    cursor: pointer;
    padding: 8px 16px;
    transition: all 0.2s;
}

.btn-link:hover:not(:disabled) {
    color: #764ba2;
    text-decoration: underline;
}

.btn-link:disabled {
    color: #aaa;
    cursor: not-allowed;
}

/* Mobile optimizations */
@media (max-width: 380px) {
    .app-container {
        padding: 20px 16px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .bot-icon {
        width: 60px;
        height: 60px;
    }
    
    .btn-telegram {
        padding: 10px 20px;
        font-size: 14px;
    }
}