/* register.css — стили для страницы регистрации (tDrops) */
:root {
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    --gradient-card: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    --bg-card: rgba(51, 65, 85, 0.4);
    --bg-glass: rgba(30, 41, 59, 0.7);
    --bg-hover: rgba(71, 85, 105, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: rgba(148, 163, 184, 0.2);
    --border-glow: rgba(139, 92, 246, 0.3);
    
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
    
    --radius: 20px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-bg);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-box {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 10px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow-glow);
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-icon span {
    font-size: 28px;
    font-weight: 800;
    color: white;
}

.auth-logo h1 {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 28px;
    color: var(--text-primary);
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.required {
    color: var(--error);
}

.form-group input {
    padding: 14px 18px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    text-align: center;
    transition: all 0.3s;
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input.error {
    border-color: #ef4444;
}

.form-group input.success {
    border-color: #10b981;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    justify-content: center;
    text-align: center;
    line-height: 1.5;
}

/* Field validation states */
.field-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    display: none;
}

.field-error.visible {
    display: block;
}

.field-success {
    font-size: 12px;
    color: #10b981;
    margin-top: 4px;
    display: none;
}

.field-success.visible {
    display: block;
}

/* Password strength */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.password-strength .bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    transition: background .3s;
}

.password-strength .bar.weak {
    background: #ef4444;
}

.password-strength .bar.medium {
    background: #f59e0b;
}

.password-strength .bar.strong {
    background: #10b981;
}

/* Password wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px !important;
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 8px 10px;
    border-radius: 4px;
    line-height: 1;
    z-index: 2;
    user-select: none;
    -webkit-user-select: none;
}

.password-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.password-toggle:active {
    color: var(--primary);
}

/* Terms checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
}

.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.terms-checkbox label {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.terms-checkbox label a {
    color: var(--primary);
    text-decoration: none;
}

.terms-checkbox label a:hover {
    text-decoration: underline;
}

/* Honeypot */
.honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.honeypot input {
    position: absolute;
    left: -9999px;
}

/* Turnstile */
.turnstile-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

/* Step system */
.step {
    display: none;
}

.step.active {
    display: block;
}

.step-header {
    text-align: center;
    margin-bottom: 24px;
}

.step-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
}

.step-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

.code-step {
    display: none;
}

.code-step.active {
    display: block;
}

/* Code inputs */
.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 24px 0;
}

.code-inputs input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: border-color .2s, transform .1s;
}

.code-inputs input:focus {
    outline: none;
    border-color: var(--primary);
    transform: scale(1.05);
}

.code-inputs input.filled {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.code-inputs input.error {
    border-color: #ef4444;
    animation: shake .3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Code timer */
.code-timer {
    text-align: center;
    font-size: 14px;
    margin: 16px 0;
}

.code-timer .resend-btn {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    width: 100%;
}

.code-timer .resend-btn:hover {
    background: rgba(99, 102, 241, 0.05);
}

.code-timer .resend-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.code-attempts {
    text-align: center;
    font-size: 13px;
    color: #f59e0b;
    margin-top: 8px;
}

.code-expired {
    text-align: center;
    font-size: 13px;
    color: #ef4444;
    margin-top: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--primary);
}

.btn-full {
    width: 100%;
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-loading .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.form-error {
    color: var(--error);
    font-size: 14px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 10px;
    border-left: 3px solid var(--error);
    display: none;
}

.form-error:not(:empty) {
    display: block;
}

.form-error div {
    margin: 4px 0;
}

.form-error.success {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success);
    text-align: center;
}

.form-error.error {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--error);
    text-align: center;
}

.form-success {
    color: var(--success);
    font-size: 14px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    border-left: 3px solid var(--success);
    display: none;
}

.form-success:not(:empty) {
    display: block;
}

.link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

/* Success / Activation modals */
.success-actions {
    margin-top: 20px;
}

.success-message {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: successPulse 0.6s ease-in-out;
}

.success-message p {
    margin: 8px 0;
    color: var(--text-primary);
    font-size: 16px;
}

.success-message p:first-of-type {
    font-weight: 600;
    font-size: 18px;
    color: #10b981;
}

@keyframes successPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.activation-message {
    text-align: center;
    padding: 8px 0;
    max-width: 400px;
    margin: 0 auto;
}

.activation-icon {
    font-size: 40px;
    margin-bottom: 8px;
    animation: emailBounce 0.6s ease-in-out;
    text-align: center;
}

.activation-message p {
    margin: 4px 0;
    color: var(--text-primary);
    font-size: 15px;
    text-align: center;
}

.activation-message p:first-of-type {
    font-weight: 600;
    font-size: 16px;
    color: #3b82f6;
    text-align: center;
}

@keyframes emailBounce {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1001;
    animation: modalIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 28px 32px;
    border-bottom: 1px solid var(--border-color);
}

.modal-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 0;
}

.modal-logo .logo-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 0;
}

.modal-logo h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: scale(1.1);
}

.modal-body {
    padding: 16px 28px;
}

.modal-body > p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
}

/* Verification Code Input */
#verification-code {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 8px;
    font-family: 'Fira Code', monospace;
    padding: 16px;
}

/* Auth Back */
.auth-back {
    margin-top: 16px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .auth-box {
        padding: 28px 24px;
    }
    
    .auth-logo h1 {
        font-size: 28px;
    }
    
    .logo-icon {
        width: 56px;
        height: 56px;
    }
    
    .logo-icon span {
        font-size: 24px;
    }
    
    .auth-title {
        font-size: 20px;
    }
    
    .modal-container {
        margin: 16px;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    #verification-code {
        font-size: 24px;
        letter-spacing: 6px;
    }
}