/**  =====================
      DAVINCI Style Authentication
      Centered card with blurred background
==========================  **/

/* Main wrapper with blurred background */
.auth-davinci {
    min-height: 100vh;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Blurred background images */
.auth-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.auth-bg-blur::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.bg-image {
    position: absolute;
    width: 300px;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    filter: blur(60px);
    opacity: 0.7;
}

.bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Background image positions */
.bg-image.pos-1 { top: 5%; left: -50px; transform: rotate(-5deg); }
.bg-image.pos-2 { top: 30%; left: 2%; transform: rotate(3deg); }
.bg-image.pos-3 { bottom: 10%; left: -30px; transform: rotate(-8deg); }
.bg-image.pos-4 { top: 8%; right: -60px; transform: rotate(6deg); }
.bg-image.pos-5 { top: 45%; right: 1%; transform: rotate(-4deg); }
.bg-image.pos-6 { bottom: 5%; right: -40px; transform: rotate(5deg); }

/* Main card container */
.auth-card {
    display: flex;
    background: #141414;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
    max-width: 950px;
    width: 100%;
    max-height: 90vh;
}

/* Left side - Gallery */
.auth-gallery {
    width: 480px;
    min-width: 480px;
    padding: 16px;
    background: #0d0d0d;
    overflow: hidden;
    max-height: 90vh;
}

/* Gallery Grid - Masonry.js */
.gallery-grid {
    width: 100%;
}

.gallery-sizer,
.gallery-item {
    width: calc(25% - 6px);
}

.gallery-item {
    margin-bottom: 8px;
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a1a;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Download button overlay */
.gallery-item .download-btn {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gallery-item:hover .download-btn {
    opacity: 1;
}

/* Right side - Form */
.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 45px;
    background: #141414;
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 8px;
}

.auth-logo img {
    width: 120px;
    height: auto;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 6px;
    margin: 0;
    font-family: 'Jura', sans-serif;
}

/* Title */
.auth-title {
    text-align: center;
    color: #777777;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 28px;
}

/* OAuth Buttons */
.auth-oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    text-decoration: none;
}

.btn-oauth-google {
    background: #ffffff;
    color: #333333;
}

.btn-oauth-google:hover {
    background: #f5f5f5;
    color: #333333;
}

.btn-oauth-apple {
    background: #ffffff;
    color: #000000;
}

.btn-oauth-apple:hover {
    background: #f5f5f5;
    color: #000000;
}

.btn-oauth img {
    width: 18px;
    height: 18px;
}

.btn-oauth i {
    font-size: 18px;
}

/* Separator */
.auth-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #555555;
    font-size: 12px;
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #2a2a2a;
}

.auth-separator span {
    padding: 0 14px;
    color: #555555;
}

/* Form inputs */
.auth-input-group {
    margin-bottom: 14px;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid #333333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
    transition: all 0.2s ease;
}

.auth-input::placeholder {
    color: #555555;
}

.auth-input:focus {
    outline: none;
    border-color: #555555;
    background: rgba(255, 255, 255, 0.02);
}

/* Input row for side-by-side inputs */
.auth-input-row {
    display: flex;
    gap: 12px;
}

.auth-input-row .auth-input-group {
    flex: 1;
}

/* Terms checkbox */
.auth-terms {
    margin: 16px 0;
}

.auth-terms .auth-checkbox {
    align-items: flex-start;
}

.auth-terms .auth-checkbox span {
    line-height: 1.5;
}

.auth-link-inline {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link-inline:hover {
    text-decoration: underline;
}

/* Form extras (remember me, forgot password) */
.auth-form-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #777777;
    font-size: 12px;
    cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.auth-checkbox input[type="checkbox"]:checked {
    background: #ffffff;
    border-color: #ffffff;
}

.auth-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #000000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-link {
    color: #777777;
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #ffffff;
}

/* Submit button */
.btn-auth-submit {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid #333333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.btn-auth-submit:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #444444;
}

/* Footer link */
.auth-footer-link {
    text-align: center;
    margin-top: 20px;
    color: #555555;
    font-size: 12px;
}

.auth-footer-link a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.auth-footer-link a:hover {
    text-decoration: underline;
}

/* Language switcher */
.auth-language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-language-switcher .header-language-switcher {
    list-style: none;
}

.auth-language-switcher .header-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2a2a2a;
    transition: all 0.2s ease;
    text-decoration: none;
}

.auth-language-switcher .header-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #444444;
}

.auth-language-switcher .language-flag-current {
    font-size: 18px;
    line-height: 1;
}

.auth-language-switcher .language-dropdown {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.auth-language-switcher .language-dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: #888888;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 6px;
}

.auth-language-switcher .language-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #cccccc;
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-language-switcher .language-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.auth-language-switcher .language-item.active {
    background: rgba(74, 144, 217, 0.1);
    color: #ffffff;
}

.auth-language-switcher .language-flag {
    font-size: 18px;
    line-height: 1;
}

.auth-language-switcher .language-info {
    flex: 1;
}

.auth-language-switcher .language-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
}

.auth-language-switcher .language-region {
    display: block;
    font-size: 10px;
    color: #666666;
}

.auth-language-switcher .language-check {
    color: #4a90d9;
    font-size: 14px;
}

/* Error messages */
.auth-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    color: #dc3545;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-gallery {
        width: 400px;
        min-width: 400px;
    }

    .gallery-sizer,
    .gallery-item {
        width: calc(33.333% - 6px);
    }
}

@media (max-width: 900px) {
    .auth-card {
        flex-direction: column;
        max-width: 420px;
    }

    .auth-gallery {
        display: none;
    }

    .auth-form-side {
        padding: 40px 30px;
    }

    .bg-image {
        width: 200px;
        height: 280px;
        filter: blur(50px);
    }
}

@media (max-width: 480px) {
    .auth-davinci {
        padding: 10px;
    }

    .auth-card {
        border-radius: 16px;
    }

    .auth-form-side {
        padding: 30px 20px;
    }

    .auth-logo h1 {
        font-size: 24px;
    }

    .bg-image {
        width: 180px;
        height: 240px;
        filter: blur(40px);
        opacity: 0.5;
    }
}

/* Hide default elements */
.auth-davinci .loader-bg {
    display: none;
}
