﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #732d43;
    --primary-dark: #7a1450;
    --primary-light: #b83280;
    --secondary: black;
    --accent: #d946ef;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    font-size: 15px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Register Wrapper */
.register-wrapper {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 50%, var(--gray-100) 100%);
    min-height: 100vh;
    padding: 2rem 0;
    position: relative;
    display: flex;
    align-items: center;
}

    .register-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: radial-gradient(circle at 15% 25%, rgba(146, 24, 96, 0.08) 0%, transparent 50%), radial-gradient(circle at 85% 75%, rgba(217, 70, 239, 0.06) 0%, transparent 50%);
        z-index: 1;
    }

.min-vh-100 {
    min-height: 100vh;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 0.75rem;
}

/* Register Container */
.register-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Desktop Layout */
@media (min-width: 992px) {
    .register-container {
        max-width: 750px;
        min-height: 700px;
    }
}

/* Visual Section - ПРЕМАХНАТА */
.register-visual-section {
    display: none !important;
}

.visual-content {
    color: var(--white);
    z-index: 3;
    position: relative;
    width: 100%;
}

.visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%), radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 2;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.visual-text h3 {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.visual-text p {
    font-size: 1.05rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

    .benefit-item:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(4px);
    }

.benefit-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--secondary);
    flex-shrink: 0;
}

.benefit-text {
    display: flex;
    flex-direction: column;
}

    .benefit-text strong {
        font-weight: 600;
        margin-bottom: 0.2rem;
        font-size: 0.95rem;
    }

    .benefit-text span {
        font-size: 0.85rem;
        opacity: 0.85;
    }

/* Form Section */
.register-form-section {
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 750px;
    background: var(--white);
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-logo {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 1.75rem;
    box-shadow: 0 10px 30px rgba(146, 24, 96, 0.3);
}

.form-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.form-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    margin: 0;
}

/* Form Sections */
.form-section {
    margin-bottom: 1.75rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 14px;
    border: 1px solid var(--gray-200);
}

.section-title {
    color: var(--gray-800);
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

    .section-title i {
        color: var(--primary);
        font-size: 1.1rem;
    }

/* Form Groups */
.form-group-modern {
    margin-bottom: 1.25rem;
}

    .form-group-modern:last-child {
        margin-bottom: 0;
    }

.form-label-modern {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.1rem;
    color: var(--gray-500);
    font-size: 1rem;
    z-index: 2;
    transition: color 0.2s ease;
}

.form-input-modern {
    width: 100%;
    padding: 1rem 1.1rem 1rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--gray-900);
    font-family: inherit;
}

    .form-input-modern:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(146, 24, 96, 0.1);
    }

        .form-input-modern:focus ~ .input-icon,
        .form-input-modern:focus + .input-icon {
            color: var(--primary);
        }

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 2;
    font-size: 1rem;
}

    .password-toggle:hover {
        color: var(--primary);
        background: rgba(146, 24, 96, 0.1);
    }

.form-error {
    display: block;
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.6rem;
    font-weight: 500;
}

/* Grid System */
.g-3 {
    margin: -0.6rem;
}

    .g-3 > * {
        padding: 0.6rem;
    }

.col-md-6,
.col-md-8,
.col-md-4 {
    padding: 0.6rem;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (max-width: 767px) {
    .col-md-6,
    .col-md-8,
    .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Password Strength */
.password-strength {
    margin-top: 0.75rem;
}

.strength-bars {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.strength-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.password-strength.weak .strength-bar:nth-child(1) {
    background: var(--danger);
}

.password-strength.fair .strength-bar:nth-child(-n+2) {
    background: var(--warning);
}

.password-strength.good .strength-bar:nth-child(-n+3) {
    background: var(--primary);
}

.password-strength.strong .strength-bar {
    background: var(--success);
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--success);
    border-color: var(--success);
}

    .checkbox-input:checked + .checkbox-custom::after {
        content: '✓';
        color: var(--white);
        font-size: 0.8rem;
        font-weight: bold;
    }

.checkbox-label {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.terms-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

    .terms-link:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

/* Submit Button */
.btn-register {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 1.125rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.75rem;
    box-shadow: 0 10px 30px rgba(146, 24, 96, 0.3);
}

    .btn-register:not(:disabled):hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 35px rgba(146, 24, 96, 0.4);
    }

    .btn-register:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    transition: opacity 0.3s ease;
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.btn-register.loading .btn-content {
    opacity: 0;
}

.btn-register.loading .btn-loading {
    opacity: 1;
}

/* Login Prompt */
.login-prompt {
    text-align: center;
}

    .login-prompt p {
        color: var(--gray-600);
        margin: 0;
        font-size: 1rem;
    }

.login-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

    .login-link:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

/* Validation Summary */
.validation-summary {
    border-left: 4px solid var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border-radius: 10px;
    margin-bottom: 1.75rem;
    padding: 1.25rem;
}

    .validation-summary ul {
        margin: 0;
        padding-left: 1.5rem;
    }

    .validation-summary li {
        color: var(--danger);
        font-size: 0.95rem;
        font-weight: 500;
    }

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Large Desktops (1400px+) */
@media (min-width: 1400px) {
    .register-container {
        max-width: 800px;
        min-height: 750px;
    }

    .register-form-section {
        padding: 4rem 3.5rem;
    }

    .form-title {
        font-size: 2.25rem;
    }

    .brand-logo {
        width: 72px;
        height: 72px;
        font-size: 2rem;
    }
}

/* Standard Desktop (992px - 1399px) */
@media (min-width: 992px) and (max-width: 1399px) {
    .register-form-section {
        padding: 2.5rem 2rem;
    }
}

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
    .register-wrapper {
        padding: 1.5rem 0;
    }

    .register-container {
        max-width: 650px;
        border-radius: 20px;
    }

    .register-form-section {
        padding: 2.5rem 2rem;
    }

    .form-title {
        font-size: 1.75rem;
    }

    .form-subtitle {
        font-size: 0.95rem;
    }

    .brand-logo {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
}

/* Mobile Landscape / Small Tablets (576px - 767px) */
@media (max-width: 767px) {
    .register-wrapper {
        padding: 1rem 0;
    }

    .register-container {
        border-radius: 18px;
        max-width: 100%;
    }

    .register-form-section {
        padding: 2rem 1.5rem;
    }

    .form-header {
        margin-bottom: 2rem;
    }

    .form-title {
        font-size: 1.625rem;
    }

    .form-subtitle {
        font-size: 0.9rem;
    }

    .form-section {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    .form-input-modern {
        padding: 0.875rem 1rem 0.875rem 2.75rem;
        font-size: 0.95rem;
    }

    .input-icon {
        left: 1rem;
        font-size: 0.95rem;
    }

    .brand-logo {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }

    .btn-register {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Mobile Portrait (375px - 575px) */
@media (max-width: 575px) {
    .register-wrapper {
        padding: 0.75rem 0;
    }

    .container {
        padding: 0 0.75rem;
    }

    .register-container {
        border-radius: 16px;
    }

    .register-form-section {
        padding: 1.75rem 1.25rem;
    }

    .form-header {
        margin-bottom: 1.75rem;
    }

    .brand-logo {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .form-subtitle {
        font-size: 0.875rem;
    }

    .form-section {
        padding: 1.125rem;
        margin-bottom: 1.25rem;
        border-radius: 12px;
    }

    .section-title {
        font-size: 0.825rem;
        gap: 0.5rem;
    }

        .section-title i {
            font-size: 1rem;
        }

    .form-group-modern {
        margin-bottom: 1rem;
    }

    .form-label-modern {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .form-input-modern {
        padding: 0.825rem 0.9rem 0.825rem 2.6rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .input-icon {
        left: 0.9rem;
        font-size: 0.9rem;
    }

    .password-toggle {
        right: 0.75rem;
        font-size: 0.9rem;
        padding: 0.4rem;
    }

    .checkbox-custom {
        width: 20px;
        height: 20px;
    }

    .checkbox-label {
        font-size: 0.875rem;
    }

    .btn-register {
        padding: 0.9rem;
        font-size: 0.95rem;
        border-radius: 10px;
        margin-bottom: 1.5rem;
    }

    .login-prompt p {
        font-size: 0.9rem;
    }

    .g-3 {
        margin: -0.4rem;
    }

        .g-3 > * {
            padding: 0.4rem;
        }
}

/* Extra Small Mobile (320px - 374px) */
@media (max-width: 374px) {
    .register-wrapper {
        padding: 0.5rem 0;
    }

    .container {
        padding: 0 0.5rem;
    }

    .register-form-section {
        padding: 1.5rem 1rem;
    }

    .form-header {
        margin-bottom: 1.5rem;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }

    .form-title {
        font-size: 1.375rem;
    }

    .form-subtitle {
        font-size: 0.85rem;
    }

    .form-section {
        padding: 1rem;
        margin-bottom: 1.125rem;
    }

    .section-title {
        font-size: 0.8rem;
    }

    .form-input-modern {
        padding: 0.75rem 0.875rem 0.75rem 2.5rem;
        font-size: 0.875rem;
    }

    .input-icon {
        left: 0.875rem;
        font-size: 0.875rem;
    }

    .btn-register {
        padding: 0.825rem;
        font-size: 0.9rem;
    }
}

/* Very Large Screens (1920px+) */
@media (min-width: 1920px) {
    .register-container {
        max-width: 850px;
    }

    .register-form-section {
        padding: 4.5rem 4rem;
    }

    .form-title {
        font-size: 2.5rem;
    }

    .form-section {
        padding: 2rem;
        margin-bottom: 2rem;
    }
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.register-container {
    animation: slideInUp 0.5s ease-out;
}

.form-section {
    opacity: 0;
    animation: slideInUp 0.5s ease-out forwards;
}

    .form-section:nth-child(1) {
        animation-delay: 0.1s;
    }

    .form-section:nth-child(2) {
        animation-delay: 0.15s;
    }

    .form-section:nth-child(3) {
        animation-delay: 0.2s;
    }

    .form-section:nth-child(4) {
        animation-delay: 0.25s;
    }

    .form-section:nth-child(5) {
        animation-delay: 0.3s;
    }

.btn-register {
    animation: slideInUp 0.5s ease-out 0.35s both;
}

.login-prompt {
    animation: slideInUp 0.5s ease-out 0.4s both;
}

/* Accessibility */
.btn-register:focus,
.terms-link:focus,
.login-link:focus,
.checkbox-wrapper:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .form-input-modern {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .password-toggle {
        padding: 0.75rem; /* Larger touch target */
    }

    .checkbox-custom {
        width: 24px;
        height: 24px;
    }
}

/* Landscape Mobile Optimization */
@media (max-height: 600px) and (orientation: landscape) {
    .register-wrapper {
        padding: 1rem 0;
    }

    .register-form-section {
        padding: 1.5rem;
    }

    .form-header {
        margin-bottom: 1.25rem;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }

    .form-title {
        font-size: 1.375rem;
    }

    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

/* Print Styles */
@media print {
    .register-container {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }

    .register-wrapper {
        background: var(--white);
    }

        .register-wrapper::before {
            display: none;
        }
}
