/* Login sayfası için özel body stili */
body.login-page {
    margin: 0;
    padding: 0;
    font-family: "Be Vietnam Pro", sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Wrapper için stil */
.login-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
    margin-top: -10px;
    margin-bottom: -10px;
}

.login-container.body {
    font-family: "Be Vietnam Pro", sans-serif;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 600px;
    height: 750px;
    position: relative;
    max-width: 100%;
    aspect-ratio: 600/750;
    margin: 0 auto;
    border-radius: 12px;
    background-image: linear-gradient(to bottom, #57007b, #f76680);
    padding: 2px 3px 1px 3px;
    box-sizing: content-box;
}

.login-form-container {
    width: 100%;
    height: 100%;
    padding: 40px;
    background-color: white;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.login-form {
    width: 100%;
    max-width: 429px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 5px;
    position: relative;
}

.input-group label {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: #999999;
}

.input-container {
    position: relative;
    width: 100%;
    height: 44px;
}

/* More aggressive styling to prevent text overlap */
.input-container input {
    width: 100%;
    height: 100%;
    padding: 12px 12px 12px 40px;
    border: none;
    border-bottom: 1px solid #d9d9d9;
    font-family: "Be Vietnam Pro", sans-serif;
    font-weight: normal !important;
    font-size: 16px;
    color: #5c5c5c;
    background-color: transparent;
    outline: none;
    box-sizing: border-box;
    /* Prevent browser autocomplete styles */
    background-image: none !important;
}

.input-container input::placeholder {
    color: #5c5c5c;
    opacity: 0.7;
}

/* Ensure placeholder disappears on input */
.input-container input:not(:placeholder-shown) {
    color: #333333;
}

/* Make placeholder disappear when input is focused */
.input-container input:focus::placeholder {
    opacity: 0;
}

/* Handle input with value for better text display */
.input-container input.has-value {
    color: #333333;
    font-weight: normal;
}

/* Ensure input text and placeholder never overlap */
.input-container input.has-value::placeholder {
    opacity: 0;
}

.input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 5;
    pointer-events: auto;
    background-color: transparent;
}

.toggle-password:hover {
    opacity: 1;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1px;
    position: relative;
    z-index: 2;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid;
    border-image: linear-gradient(to bottom, #57007b, #f76680) 1;
    background-color: white;
    cursor: pointer;
    position: relative;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.remember-me input[type="checkbox"]:checked {
    background: linear-gradient(
        to bottom,
        rgba(87, 0, 123, 0.1),
        rgba(247, 102, 128, 0.1)
    );
}

.remember-me input[type="checkbox"]:checked::before {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    background: linear-gradient(to bottom, #57007b, #f76680);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: checkbox-check 0.2s ease-in-out;
}

@keyframes checkbox-check {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.remember-me label {
    font-family: "Be Vietnam Pro", sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: #5c5c5c;
}

.forgot-password {
    position: relative;
    display: inline-block;
    color: #666666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.forgot-password:after {
    content: "";
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, #57007b, #f76680);
    transition: width 0.3s ease;
}

.forgot-password:hover {
    color: #57007b;
}

.forgot-password:hover:after {
    width: 100%;
}

/* Enhanced login button with animations */
.login-button {
    width: 100%;
    padding: 15px 0;
    background: linear-gradient(
        45deg,
        rgba(87, 0, 123, 0.8),
        rgba(247, 102, 128, 0.8)
    );
    border: none;
    border-radius: 30px;
    color: white;
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(87, 0, 123, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    z-index: 1;
}

.login-button:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.6s ease;
    z-index: -1;
}

.login-button:hover:before {
    left: 100%;
}

.login-button:hover {
    background: linear-gradient(
        45deg,
        rgba(87, 0, 123, 0.9),
        rgba(247, 102, 128, 0.9)
    );
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(87, 0, 123, 0.35);
}

.login-button:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 3px 10px rgba(87, 0, 123, 0.2);
}

/* Enhance ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.4) 40%,
        rgba(255, 255, 255, 0.2) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: scale(0);
    animation: ripple-animation 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Enhanced button ripple effect */
.login-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.7);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.login-button:focus:not(:active)::after {
    animation: ripple 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.7;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: scale(50, 50);
    }
}

/* Enhanced checkmark animation */
.checkmark {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0;
    animation: checkmark-appear 0.7s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    text-shadow: 0 0 5px rgba(39, 174, 96, 0.5);
}

@keyframes checkmark-appear {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0) rotate(-20deg);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.3) rotate(5deg);
    }
    70% {
        transform: translateY(-50%) scale(0.9) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1) rotate(0deg);
    }
}

/* Custom button state: disabled */
.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 10px rgba(87, 0, 123, 0.15);
}

/* Success state for button */
.login-button.success {
    background: linear-gradient(
        45deg,
        rgba(39, 174, 96, 0.7),
        rgba(39, 174, 96, 0.9)
    );
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

/* Add a subtle pulsating effect to the button */
@keyframes subtle-pulse {
    0% {
        box-shadow: 0 6px 20px rgba(87, 0, 123, 0.25);
    }
    50% {
        box-shadow: 0 6px 25px rgba(87, 0, 123, 0.4);
    }
    100% {
        box-shadow: 0 6px 20px rgba(87, 0, 123, 0.25);
    }
}

.login-button:not(:disabled):not(:active):not(:hover) {
    animation: subtle-pulse 2s infinite;
}

/* Shake animation for error validation */
.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    transform: translate3d(0, 0, 0);
}

@keyframes shake {
    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }
    30%,
    50%,
    70% {
        transform: translate3d(-3px, 0, 0);
    }
    40%,
    60% {
        transform: translate3d(3px, 0, 0);
    }
}

/* Success message styling */
.error-message-container.success {
    background-color: rgba(39, 174, 96, 0.1);
    border-left: 3px solid #27ae60;
    color: #27ae60;
}

/* Error message styles */
.error-message-container {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #d32f2f;
    font-size: 14px;
    animation: fadeIn 0.3s ease-in-out;
}

.error-message {
    color: #f44336;
    font-size: 12px;
    margin-top: 4px;
    margin-bottom: 5px;
    min-height: 16px;
    font-family: "Be Vietnam Pro", sans-serif;
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-in-out;
    position: static;
    display: block;
    visibility: hidden;
    height: auto;
    overflow: hidden;
}

.error-message:not(:empty) {
    visibility: visible;
}

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

.input-container.error {
    border-bottom: 1px solid #f44336;
}

.input-container.error input {
    color: #f44336;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .login-form-container {
        padding: 30px 20px;
    }

    .login-form {
        max-width: 100%;
    }

    .remember-forgot {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .login-container {
        height: auto;
    }
}

/* Ensure no autofill background color changes the input appearance */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #333333 !important;
}

/* Custom focus styles */
input:focus {
    outline: none !important;
}

/* Hover effects for input fields */
.input-container:hover {
    border-color: rgba(87, 0, 123, 0.3);
}

/* Add transition for all interactive elements */
a,
button,
input,
.input-container {
    transition: all 0.3s ease;
}

/* Loading animation for button */
.login-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.loading-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
}

.loading-dots span {
    width: 5px;
    height: 5px;
    margin: 0 2px;
    background-color: white;
    border-radius: 50%;
    display: inline-block;
    animation: dots-animation 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dots-animation {
    0%,
    80%,
    100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Success particles effect */
.success-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.particle {
    position: absolute;
    border-radius: 50%;
    z-index: 101;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Error state for button */
.login-button.error {
    background: linear-gradient(
        45deg,
        rgba(244, 67, 54, 0.7),
        rgba(244, 67, 54, 0.9)
    );
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.3);
}

/* Add pulse animation when button is in success state */
.login-button.success {
    animation: success-pulse 2s infinite;
}

@keyframes success-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

/* Improve focus styles */
.login-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(87, 0, 123, 0.3),
        0 6px 20px rgba(87, 0, 123, 0.25);
}
