/* ========================================
   ULTRA PREMIUM SIGNIN STYLES
   Luxury Design | Advanced Animations | Premium UX
   ======================================== */

:root {
    --horizon-purple: #2f6fed;
    --horizon-purple-light: #4b84f5;
    --horizon-indigo: #1a2332;
    --horizon-indigo-light: #5aa7c7;
    --horizon-cyan: #5aa7c7;
    --horizon-gray: #9aa5b8;
    --horizon-gray-dark: #6b778c;
    --horizon-white: #FFFFFF;
    
    --gradient-premium: #2f6fed;
    --shadow-premium: 0 8px 24px rgba(47, 111, 237, 0.18);
}

/* ========================================
   CONTAINER
   ======================================== */

.signin-container {
    width: 100%;
    max-width: 420px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    animation: slideInPremium 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInPremium {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.signin-content {
    width: 100%;
}

/* ========================================
   PREMIUM HEADING
   ======================================== */

.signin-heading {
    margin-bottom: 26px;
    animation: fadeInDown 1s ease-out 0.3s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.signin-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a2332;
    margin: 0 0 10px 0;
    line-height: 1.15;
    letter-spacing: -0.03em;
    position: relative;
    font-family: 'Outfit', sans-serif;
}

.signin-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: #2f6fed;
}

.signin-subtitle {
    font-size: 13px;
    color: var(--horizon-gray-dark);
    margin: 12px 0 0 0;
    line-height: 1.5;
    font-weight: 500;
    animation: fadeIn 1s ease-out 0.5s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   PREMIUM FORM
   ======================================== */

.signin-form {
    width: 100%;
    animation: fadeInUp 1s ease-out 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-field {
    margin-bottom: 18px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--horizon-indigo);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

/* Ultra Premium Glassmorphism Input */
.form-input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(30px);
    border: 2px solid rgba(163, 174, 208, 0.15);
    border-radius: 11px;
    font-size: 14px;
    color: var(--horizon-indigo);
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    box-shadow: 0 4px 16px rgba(67, 24, 255, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
}

.form-input:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(163, 174, 208, 0.25);
    box-shadow: 0 6px 24px rgba(67, 24, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.form-input:focus {
    outline: none;
    border-color: var(--horizon-purple);
    background: var(--horizon-white);
    box-shadow: 0 0 0 4px rgba(67, 24, 255, 0.1),
                0 8px 32px rgba(67, 24, 255, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-3px);
}

.form-input::placeholder {
    color: var(--horizon-gray);
    font-weight: 400;
}

.form-field:focus-within .form-label {
    color: var(--horizon-purple);
    transform: translateX(2px);
}

/* Password */
.password-input-wrapper {
    position: relative;
}

.password-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(67, 24, 255, 0.1), rgba(134, 140, 255, 0.1));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(67, 24, 255, 0.2);
    border-radius: 9px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 12px rgba(67, 24, 255, 0.1);
}

.password-input-wrapper:has(.password-input:not(:placeholder-shown)) .password-toggle {
    opacity: 1;
    pointer-events: auto;
}

.password-toggle:hover {
    background: var(--gradient-premium);
    border-color: transparent;
    transform: translateY(-50%) scale(1.15) rotate(10deg);
    box-shadow: 0 6px 20px rgba(67, 24, 255, 0.3);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.9) rotate(-10deg);
}

.password-icon {
    font-size: 18px;
    color: var(--horizon-purple);
    transition: all 0.3s ease;
}

.password-toggle:hover .password-icon {
    color: white;
    transform: scale(1.1);
}

/* ========================================
   PREMIUM CHECKBOX & OPTIONS
   ======================================== */

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 5px 8px;
    border-radius: 7px;
    transition: all 0.3s ease;
    background: rgba(67, 24, 255, 0.02);
}

.checkbox-label:hover {
    background: rgba(67, 24, 255, 0.06);
    transform: translateX(2px);
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--horizon-purple);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.checkbox-input:hover {
    transform: scale(1.2) rotate(10deg);
}

.checkbox-input:active {
    transform: scale(0.85);
}

.checkbox-text {
    font-size: 13px;
    color: var(--horizon-indigo);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.forgot-password-link {
    font-size: 13px;
    color: var(--horizon-purple);
    font-weight: 700;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 7px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.forgot-password-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-premium);
    opacity: 0;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.forgot-password-link:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(67, 24, 255, 0.3);
}

.forgot-password-link:hover::before {
    opacity: 1;
}

.forgot-password-link span {
    position: relative;
    z-index: 1;
}

/* ========================================
   ULTRA PREMIUM SQUISHY BUTTON
   ======================================== */

.signin-submit-btn {
    width: 100%;
    padding: 15px 32px;
    background: #2f6fed;
    border: none;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(47, 111, 237, 0.28);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 1;
}

/* Premium Hover Effect */
.signin-submit-btn:hover {
    background: #255dd1;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(47, 111, 237, 0.35);
}

/* Ultra Squishy Active */
.signin-submit-btn:active {
    transform: translateY(0);
    background: #1f52ba;
    box-shadow: 0 4px 14px rgba(47, 111, 237, 0.25);
}

.signin-submit-btn::before,
.signin-submit-btn::after {
    display: none !important;
}

.signin-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.signin-submit-btn .signin-btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    animation: signin-spin 0.7s linear infinite;
}

.signin-submit-btn .signin-btn-label {
    vertical-align: middle;
}

.signin-submit-btn.is-loading {
    opacity: 1;
    cursor: wait;
    pointer-events: none;
    background: #255dd1;
    transform: none;
    box-shadow: 0 6px 18px rgba(47, 111, 237, 0.28);
}

.signin-submit-btn.is-loading .signin-btn-spinner {
    display: inline-block;
}

@keyframes signin-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   PREMIUM SIGN UP LINK
   ======================================== */

.signin-signup-link {
    margin-top: 20px;
    font-size: 13px;
    color: var(--horizon-gray-dark);
    text-align: center;
    font-weight: 500;
    animation: fadeIn 1.2s ease-out 0.8s both;
}

.signup-link {
    color: var(--horizon-purple);
    font-weight: 700;
    text-decoration: none;
    position: relative;
    padding: 2px 4px;
    transition: all 0.3s ease;
}

.signup-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-premium);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.signup-link:hover {
    color: var(--horizon-purple-light);
    transform: translateY(-1px);
}

.signup-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ========================================
   PREMIUM FOOTER
   ======================================== */

.signin-footer {
    width: 100%;
    margin-top: 28px;
    padding-top: 20px;
    text-align: center;
    border-top: 1px solid rgba(163, 174, 208, 0.12);
    animation: fadeIn 1.4s ease-out 1s both;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    font-size: 12px;
    color: var(--horizon-gray);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 4px 8px;
    border-radius: 6px;
}

.footer-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--horizon-purple), var(--horizon-cyan));
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.footer-link:hover {
    color: var(--horizon-white);
    transform: translateY(-2px);
}

.footer-link:hover::before {
    opacity: 1;
}

.footer-separator {
    color: rgba(163, 174, 208, 0.3);
    font-size: 12px;
    user-select: none;
}

.signin-copyright {
    font-size: 12px;
    color: var(--horizon-gray);
    font-weight: 500;
    margin: 0;
    line-height: 1.6;
}

.heart {
    color: #ef4444;
    display: inline-block;
    animation: heartbeatPremium 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.4));
}

@keyframes heartbeatPremium {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.2);
    }
    20%, 40% {
        transform: scale(1);
    }
}

.themewagon-link {
    color: var(--horizon-purple);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.themewagon-link:hover {
    color: var(--horizon-purple-light);
}

/* ========================================
   PREMIUM ERROR MESSAGE
   ======================================== */

.error-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.12));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(239, 68, 68, 0.25);
    color: #dc2626;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    font-weight: 600;
    animation: errorShake 0.6s ease-in-out, fadeIn 0.3s ease-out;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

.text-danger {
    display: block;
    color: #dc2626;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    animation: fadeIn 0.3s ease-out;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .signin-container {
        max-width: 100%;
        justify-content: flex-start;
        padding-top: 16px;
    }
    
    .signin-heading {
        margin-bottom: 24px;
    }
    
    .signin-title {
        font-size: 32px;
    }
    
    .form-field {
        margin-bottom: 18px;
    }
    
    .form-options {
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {
    .signin-title {
        font-size: 28px;
    }
    
    .signin-subtitle {
        font-size: 13px;
    }
    
    .form-input {
        padding: 13px 16px;
        font-size: 13px;
    }
    
    .signin-submit-btn {
        padding: 15px 28px;
        font-size: 12px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ========================================
   DARK MODE
   ======================================== */

[data-theme="dark"] .form-input {
    background: rgba(22, 33, 62, 0.6);
    border-color: rgba(163, 174, 208, 0.12);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .form-input:hover {
    background: rgba(22, 33, 62, 0.75);
    border-color: rgba(163, 174, 208, 0.18);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .form-input:focus {
    background: rgba(22, 33, 62, 0.85);
    border-color: var(--horizon-purple);
    box-shadow: 0 0 0 4px rgba(67, 24, 255, 0.15),
                0 8px 32px rgba(67, 24, 255, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .form-label {
    color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .checkbox-text {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .checkbox-label {
    background: rgba(67, 24, 255, 0.08);
    border: 1px solid rgba(67, 24, 255, 0.15);
}

[data-theme="dark"] .checkbox-label:hover {
    background: rgba(67, 24, 255, 0.15);
    border-color: rgba(67, 24, 255, 0.25);
}

[data-theme="dark"] .signin-subtitle {
    color: rgba(163, 174, 208, 0.9);
}

[data-theme="dark"] .signin-footer {
    border-top-color: rgba(163, 174, 208, 0.1);
}

[data-theme="dark"] .footer-link {
    color: rgba(163, 174, 208, 0.9);
}

[data-theme="dark"] .footer-link:hover {
    color: var(--horizon-white);
}

[data-theme="dark"] .footer-separator {
    color: rgba(163, 174, 208, 0.2);
}

[data-theme="dark"] .signin-copyright {
    color: rgba(163, 174, 208, 0.8);
}

[data-theme="dark"] .signin-copyright {
    color: rgba(163, 174, 208, 0.8);
}

[data-theme="dark"] .error-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.2));
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

[data-theme="dark"] .password-toggle {
    background: linear-gradient(135deg, rgba(67, 24, 255, 0.15), rgba(134, 140, 255, 0.15));
    border-color: rgba(67, 24, 255, 0.25);
}

[data-theme="dark"] .forgot-password-link {
    color: var(--horizon-indigo-light);
}

[data-theme="dark"] .signup-link {
    color: var(--horizon-indigo-light);
}
