/* =============================================================================
   LOGIN PAGE STYLES - Modern Centered Design with Real Chat System
   ============================================================================= */

/* Reset for login page */
body.login-page {
    font-family: 'Montserrat', sans-serif;
    background: var(--primary-color);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* Login Container - Centered */
.login-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--primary-color);
    overflow: hidden;
}

/* Animated Background */
.login-background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    background: 
        var(--primary-color),
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}

/* Real Chat Messages - Matching waContainer-contentChatArea.css */
.login-message {
    position: absolute;
    max-width: 320px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    opacity: 0.22;
    animation: floatMessage 30s infinite ease-in-out;
    filter: blur(0.8px);
    pointer-events: none;
}

.login-message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.login-message.received {
    align-self: flex-start;
    flex-direction: row;
}

/* Message Avatar */
.login-message .message-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    margin-top: -12px;
    opacity: 0.3;
}

.login-message .message-avatar i {
    color: var(--text-dark-low);
    font-size: 14px;
    opacity: 0.7;
}

/* Message Wrapper */
.login-message .message-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Message Content - Real Chat Style */
.login-message .messageContent {
    padding: 8px 12px;
    border-radius: 8px 0 8px 8px;
    position: relative;
    background: var(--card-bg);
    opacity: 0.7;
    backdrop-filter: blur(1.5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.login-message.received .messageContent {
    border-radius: 0 8px 8px 8px;
    background: rgba(252, 252, 252, 0.65);
}

.login-message.sent .messageContent {
    background: rgba(255, 255, 255, 0.65);
    color: var(--text-dark);
    border-radius: 8px 0 8px 8px;
}

/* Message Tails (Kuyruklar) - Real Chat Style */
.login-message.received .messageContent::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 8px solid rgba(252, 252, 252, 0.5);
    border-left: 8px solid transparent;
}

.login-message.sent .messageContent::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 8px solid rgba(255, 255, 255, 0.5);
    border-right: 8px solid transparent;
}

.login-message .messageContent p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-dark);
    word-wrap: break-word;
    opacity: 0.6;
    filter: blur(0.6px);
    user-select: none;
    font-weight: 400;
}

.login-message.sent .messageContent p {
    color: var(--text-dark);
    opacity: 0.6;
    filter: blur(0.6px);
}

/* Message Time */
.login-message .messageTime {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 3px;
    text-align: right;
    opacity: 0.4;
    filter: blur(0.5px);
    user-select: none;
}

.login-message.received .messageTime {
    text-align: left;
    color: rgba(0, 0, 0, 0.4);
}

/* Message Positions - Balanced Distribution - More Messages */
.login-message-1 {
    top: 5%;
    right: 12%;
    animation-delay: 0s;
    animation-duration: 28s;
}

.login-message-2 {
    top: 8%;
    left: 10%;
    animation-delay: 1s;
    animation-duration: 30s;
}

.login-message-3 {
    top: 15%;
    right: 8%;
    animation-delay: 2s;
    animation-duration: 32s;
}

.login-message-4 {
    top: 18%;
    left: 6%;
    animation-delay: 3s;
    animation-duration: 29s;
}

.login-message-5 {
    top: 28%;
    right: 15%;
    animation-delay: 4s;
    animation-duration: 31s;
}

.login-message-6 {
    top: 32%;
    left: 12%;
    animation-delay: 5s;
    animation-duration: 33s;
}

.login-message-7 {
    top: 42%;
    right: 10%;
    animation-delay: 6s;
    animation-duration: 30s;
}

.login-message-8 {
    top: 48%;
    left: 8%;
    animation-delay: 7s;
    animation-duration: 28s;
}

.login-message-9 {
    top: 58%;
    right: 13%;
    animation-delay: 8s;
    animation-duration: 31s;
}

.login-message-10 {
    top: 62%;
    left: 11%;
    animation-delay: 9s;
    animation-duration: 29s;
}

@keyframes floatMessage {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.22;
        filter: blur(0.8px);
    }
    25% {
        transform: translate(20px, -30px) rotate(0.5deg) scale(1.01);
        opacity: 0.26;
        filter: blur(1px);
    }
    50% {
        transform: translate(-15px, -50px) rotate(-0.5deg) scale(0.99);
        opacity: 0.23;
        filter: blur(0.9px);
    }
    75% {
        transform: translate(25px, -20px) rotate(0.3deg) scale(1.005);
        opacity: 0.25;
        filter: blur(0.95px);
    }
}

/* Date Separator - Real Chat Style */
.login-date-separator {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
    opacity: 0.18;
    animation: floatDate 35s infinite ease-in-out;
    filter: blur(0.6px);
    pointer-events: none;
}

.login-date-separator span {
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    opacity: 0.7;
    user-select: none;
}

@keyframes floatDate {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.18;
        filter: blur(0.6px);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.22;
        filter: blur(0.8px);
    }
}

/* Left Side - Login Form (Now Centered) */
.login-form-section {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 20px;
    animation: slideUp 0.6s ease-out;
}

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

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    position: relative;
    backdrop-filter: blur(10px);
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 36px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    height: 56px;
    width: auto;
    object-fit: contain;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Form Styles - Optimized */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: rgba(0, 0, 0, 0.35);
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.input-group.focused .input-icon {
    color: var(--primary-color);
}

/* Password input - native reveal button gizle */
.password-input::-ms-reveal,
.password-input::-ms-clear {
    display: none;
}

.password-input::-webkit-credentials-auto-fill-button,
.password-input::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    position: absolute;
    right: 0;
}

.form-control {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: white;
    color: var(--text-dark);
    transition: all 0.2s ease;
    height: 42px;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(232, 51, 48, 0.1);
}

.form-control::placeholder {
    color: var(--text-dark-low);
    font-size: 13px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    color: #666666;
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    opacity: 1;
    background: transparent;
}

.password-toggle i {
    color: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.password-toggle:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.password-toggle:hover i {
    color: var(--primary-color);
}

.form-text {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 10px 16px;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    margin-top: 6px;
}

.btn-login:hover {
    background: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    transform: scale(1.02);
}

.btn-login:active {
    transform: scale(1);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Language Selector */
.language-selector {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.selected-language {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(232, 51, 48, 0.05);
    border: 1px solid rgba(232, 51, 48, 0.15);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
    color: var(--text-primary);
    min-width: 110px;
    justify-content: space-between;
}

.selected-language:hover {
    background: rgba(232, 51, 48, 0.1);
    border-color: rgba(232, 51, 48, 0.25);
}

.dropdown-arrow {
    font-size: 9px;
    transition: transform 0.2s ease;
    color: var(--primary-color);
}

.selected-language.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px var(--shadow-light);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.language-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
    color: var(--text-primary);
    position: relative;
    justify-content: space-between;
}

.language-option:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.language-option.active {
    background: rgba(232, 51, 48, 0.05);
    color: var(--primary-color);
    font-weight: 500;
}

.language-option .flag {
    font-size: 14px;
}

.check-icon {
    font-size: 9px;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.language-option.active .check-icon {
    opacity: 1;
}

/* Messages */
.error-message,
.success-message {
    padding: 8px 10px;
    border-radius: var(--radius-md);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    animation: slideDown 0.3s ease-out;
}

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

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.error-message i,
.success-message i {
    font-size: 12px;
    flex-shrink: 0;
}

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

    .login-card {
        max-width: 100%;
        padding: 40px 32px;
    }

    .login-title {
        font-size: 22px;
    }

    .logo {
        height: 50px;
    }
    
    .login-message {
        max-width: 220px;
        opacity: 0.15;
    }
}

@media (max-width: 480px) {
    .login-form-section {
        padding: 20px 16px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 20px;
    }

    .logo {
        height: 44px;
    }
    
    .login-message {
        max-width: 180px;
        opacity: 0.12;
    }
}
