/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* Color Variables */
:root {
    --primary-color: #4a6cf7;
    --secondary-color: #2c3e7c;
    --text-color: #f4f5f7;
    --background-color: #1e2232;
    --input-background: #2c3142;
    --input-border-color: #3a4268;
    --input-focus-color: rgba(74, 108, 247, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--background-color), #1a1f32);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
    padding: 15px;
    overflow-x: hidden;
}

.login-container {
    background: rgba(44, 49, 66, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.2),
        0 10px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--input-border-color);
    transition: all 0.4s ease;
    margin: 15px;
}

/* Mobile Responsiveness Improvements */
@media screen and (max-width: 480px) {
    body {
        padding: 10px;
        background: var(--background-color);
    }

    .login-container {
        max-width: 100%;
        padding: 30px 20px;
        margin: 0;
        border-radius: 12px;
        box-shadow: 
            0 10px 20px rgba(0, 0, 0, 0.15),
            0 5px 10px rgba(0, 0, 0, 0.1);
        /* Mobil için bulanıklık sorununu çözen ayarlar */
        background: var(--input-background);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 25px;
    }

    input[type="email"],
    input[type="password"],
    .password-input,
    input[type="submit"] {
        padding: 12px 15px;
        font-size: 14px;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .center-image {
        width: 120px;
        margin-bottom: 20px;
    }

    .error-message {
        width: calc(100% - 30px);
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Rest of the previous CSS remains the same */
.center-image {
    width: 150px;
    height: auto;
    margin-bottom: 25px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

h1 {
    color: var(--text-color);
    font-size: 26px;
    margin-bottom: 30px;
    font-weight: 600;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 10px;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 2px solid var(--input-border-color);
    border-radius: 10px;
    font-size: 16px;
    color: var(--text-color);
    background-color: var(--input-background);
    transition: all 0.3s ease;
    outline: none;
}

input[type="email"]:focus,
input[type="password"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--input-focus-color);
}

input[type="submit"] {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
}

input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(74, 108, 247, 0.2);
}

/* Password Input Wrapper */
.password-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.password-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid var(--input-border-color);
    border-radius: 10px;
    font-size: 16px;
    color: var(--text-color);
    background-color: var(--input-background);
    transition: all 0.3s ease;
    outline: none;
}

.password-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--input-focus-color);
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.3s ease;
    z-index: 10;
    padding: 5px;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Error Message */
.error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3545;
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(220, 53, 69, 0.2);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.error-message.active {
    opacity: 1;
    visibility: visible;
    top: 30px;
}

.error-message .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-left: 10px;
    line-height: 1;
}

.error-message .close-btn:hover {
    transform: scale(1.2);
}

/* Placeholder Styles */
::placeholder {
    color: #6b7280;
    transition: color 0.3s ease;
}

input:focus::placeholder {
    color: #9ca3af;
}

/* Additional Mobile Responsiveness Tweaks */
@media screen and (max-height: 700px) {
    .login-container {
        padding: 25px 20px;
    }

    .center-image {
        width: 100px;
        margin-bottom: 15px;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* Prevent Auto Zoom on Mobile Inputs */
@media screen and (max-width: 480px) {
    input[type="email"],
    input[type="password"],
    .password-input {
        font-size: 16px;
    }
}