div#login {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sensor-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #ededed;
}

.sensor-icon {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    opacity: 0.3;
    pointer-events: none;
    /* Animasyon özellikleri kaldırıldı */
    animation: float 12s infinite linear;
    will-change: transform, opacity;
    backface-visibility: hidden;
    contain: layout paint;
}

.sensor-icon.temperature { font-size: 65px; color: #e74c3c; top: 10%; left: 5%; animation-delay: 0s; }
.sensor-icon.humidity { font-size: 60px; color: #3498db; top: 20%; left: 20%; animation-delay: 1s; }
.sensor-icon.humidity-alt { font-size: 45px; color: #2980b9; bottom: 20%; left: 30%; animation-delay: 3s; }
.sensor-icon.voltage { font-size: 70px; color: #f1c40f; bottom: 20%; left: 5%; animation-delay: 2s; }
.sensor-icon.energy { font-size: 65px; color: #e91e63; top: 50%; left: 25%; animation-delay: 4s; }
.sensor-icon.battery { font-size: 50px; color: #8e44ad; top: 80%; right: 75%; animation-delay: 5s; }
.sensor-icon.network { font-size: 50px; color: #9c27b0; top: 15%; right: 25%; animation-delay: 1.5s; }
.sensor-icon.wifi { font-size: 50px; color: #27ae60; top: 20%; right: 10%; animation-delay: 6s; }
.sensor-icon.phone { font-size: 55px; color: #1abc9c; bottom: 20%; right: 10%; animation-delay: 4.5s; }
.sensor-icon.smog { font-size: 60px; color: #16a085; top: 45%; left: 10%; animation-delay: 7s; }
.sensor-icon.sms { font-size: 55px; color: #e67e22; top: 50%; left: 75%; animation-delay: 5.5s; }
.sensor-icon.fire { font-size: 60px; color: #f44336; bottom: 10%; right: 25%; animation-delay: 6.5s; }
.sensor-icon.email-open { font-size: 50px; color: #ff5722; top: 40%; right: 5%; animation-delay: 8s; }

@keyframes float {
    0% {transform: translate3d(0, 0, 0) rotate(0deg);}
    25% {transform: translate3d(-10px, 0, 0) rotate(0deg);}
    50% {transform: translate3d(0, -20px, 0) rotate(10deg);}
    75% {transform: translate3d(10px, 0, 0) rotate(-10deg);}
    100% {transform: translate3d(0, 0, 0) rotate(0deg);}
}

/*@keyframes float {
    0% {transform: translate3d(0, 0, 0) rotate(0deg);}
    50% {transform: translate3d(0, -20px, 0) rotate(5deg);}
    100% {transform: translate3d(0, 0, 0) rotate(0deg);}
}*/

.language-selector {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 10;
    margin-bottom: 0;
}

.lang-flag {
    width: 30px;
    height: 30px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.2s ease-in-out;
    background-color: transparent;
    object-fit: cover;
}

.lang-flag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.lang-flag.active {
    border: 2px solid #2196f3;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.6);
}

.login-container {
    background-color: #fff;
    padding: 130px 40px 20px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    text-align: center;
    max-width: 300px;
    width: 90%;
    z-index: 2;
    position: relative;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

.ldap-select-container {
    margin-bottom: 20px;
    text-align: left;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    animation: fadeIn 0.5s ease-out;
}

.ldap-select-container label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-weight: bold;
    font-size: 13px;
}

.ldap-select-container select {
    width: 100%;
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    appearance: none;
    background-color: white;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2C114.7L146.2%2C255.5L5.4%2C114.7H287z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 7px center;
    background-size: 9px;
    cursor: pointer;
    text-align: center;
}

.ldap-select-container select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.2);
}

.input-group {
    margin-bottom: 0px;
}

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

.input-field-wrapper .icon-left {
    position: absolute;
    left: 10px;
    color: #777;
    font-size: 16px;
    z-index: 2;
}

.input-field-wrapper .icon-right {
    position: absolute;
    right: 10px;
    color: #777;
    font-size: 16px;
    z-index: 2;
}

.input-field-wrapper label {
    position: absolute;
    left: 45px;
    top: 9px;
    font-size: 15px;
    color: #888;
    pointer-events: none;
    transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    background-color: transparent;
    padding: 0;
    z-index: 2;
}

.input-field-wrapper input {
    width: 100%;
    padding: 8px 10px 8px 35px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.input-field-wrapper input#password {
    padding-right: 35px;
}

.input-field-wrapper input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.2);
}

.input-group input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    background-color: #ffffff;
}

.input-field-wrapper input:focus + .icon {
    color: #007bff;
}

.input-group.focused label,
.input-group.has-value label {
    top: -10px;
    font-size: 12px; /* 12px */
    font-weight: bold;
    color: #007bff;
    background-color: #f0f2f5;
    transform: translateX(-5px);
    padding: 0 5px;
    box-shadow: 0 0 0 1px #f0f2f5;
    border-radius: 3px;
}

.input-group input::placeholder {
    opacity: 0;
    visibility: hidden;
}

.password-toggle-icon {
    position: absolute;
    right: 25px;
    color: #777;
    font-size: 16px;
    cursor: pointer;
    z-index: 3;
    transition: color 0.2s ease;
}

.password-toggle-icon:hover {
    color: #333;
}

.input-group.error input {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

.input-group.error label {
    color: #dc3545;
}

.input-group.error .input-field-wrapper input {
    border-color: #dc3545 !important;
}

.input-group.error .input-field-wrapper .icon-left,
.input-group.error .input-field-wrapper .icon-right {
    color: #dc3545 !important;
}

.error-message-inline {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
    margin-left: 0px;
    min-height: 20px;
    visibility: hidden;
    text-align: left;
    font-weight: bold;
    height: 25px;
}

.login-button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    margin-top: 10px;
}

.login-button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

.forgot-password-button {
    background: none;
    border: none;
    color: #007bff;
    font-size: 12px;
    cursor: pointer;
    margin-top: -21px;
    text-align: right;
    font-weight: bold;
    display: inline-block;
    float: right;
    clear: both;
}

.forgot-password-button:hover {
    color: #0056b3;
    text-decoration: underline;
}

.forgot-password-fields {
    margin-top: 0px;
    padding-top: 0px;
    border-top: 1px solid #eee;
    animation: fadeIn 0.5s ease-out;
}

.instruction-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.4;
}

.or-separator {
    margin: 18px 0;
    color: #aaa;
    font-size: 12px;
    position: relative;
    text-align: center;
}

.or-separator::before,
.or-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: #eee;
}

.or-separator::before {
    left: 0;
}

.or-separator::after {
    right: 0;
}

.back-to-login-button {
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    margin-top: 10px;
}

.back-to-login-button:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.back-to-login-button:active {
    transform: translateY(0);
}

.verification-code-fields {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
}

.verification-code-fields label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
    font-size: 12px;
}

.code-inputs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.code-input {
    width: 40px;
    height: 40px;
    font-size: 24px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.code-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#countdownTimer {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

.ldap-button {
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    margin-top: 0;
}

.ldap-button:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.ldap-button:active {
    transform: translateY(0);
}

.message {
    margin-top: 18px;
    font-size: 13px;
    color: #888;
}

.message.success {
    color: #28a745;
    font-weight: bold;
}

.message.error {
    color: #dc3545;
    font-weight: bold;
}

.disabled-form-section {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

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

@media (max-width: 500px) {
    .login-container {
        padding: 20px 30px;
        max-width: 90%;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .input-field-wrapper input {
        padding: 8px 10px 8px 35px;
        font-size: 13px;
    }

    .input-field-wrapper input#password {
        padding-right: 35px;
    }

    .input-field-wrapper .icon,
    .password-toggle-icon {
        font-size: 14px;
        left: 10px;
        right: 10px;
    }

    .login-button,
    .ldap-button,
    .back-to-login-button,
    #verifyCodeButton {
        padding: 8px 15px;
        font-size: 14px;
    }

    .forgot-password-button {
        font-size: 11px;
    }

    .ldap-select-container {
        padding: 8px;
    }

    .ldap-select-container label {
        font-size: 12px;
    }

    .ldap-select-container select {
        padding: 6px;
        font-size: 13px;
    }

    .or-separator {
        margin: 15px 0;
        font-size: 11px;
    }
}



.sensplorer-svg-logo {
    position: absolute;
    top: -60px;
    left: 53%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.main-logo {
    /*font-family: 'Segoe UI Semibold', 'Helvetica Neue Bold', Arial, sans-serif;*/
    font-family: 'Lucida Console', 'Courier New', monospace;;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-top: 20px;
    margin-bottom: 5px;
    
    background: linear-gradient(135deg, #3f51b5 0%, #4caf50 50%, #42A5F5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    
    background-size: 200% 200%;
    animation: gradientFlow 6s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}



.logo-container {
    margin: -70px auto 20px auto;
    padding-top: 40px;
    position: relative;
}

.subtext {
    font-size: 0.8rem;
    color: #000;
    letter-spacing: 0.3px;
    margin-bottom: 0px;
    font-weight: bold;
}

.page-info {
    font-family: 'Segoe UI Semibold', 'Helvetica Neue Bold', Arial, sans-serif;
    font-size: 1rem;
    font-weight: bold;
    color: #000;
    letter-spacing: 0.2px;
    margin-bottom: 20px;
}


@media (max-width: 480px) {
    .logo-container {
        margin-top: -50px;
    }

    .sensplorer-svg-logo {
        width: 100px;
        height: 100px;
        top: -50px;
    }

    .main-logo {
        font-size: 1.7rem;
    }

    .subtext {
        font-size: 0.75rem;
    }
}


.clear-icon {
    display: none;
    position: absolute;
    right: 5px;
    top: -12px;
    cursor: pointer;
    color: #999;
    background-color: #fff;
    border-radius: 50%;
    padding: 2px;
    font-size: 14px;
    display: none;
    z-index: 10;
}

.clear-icon:hover {
    color: #333;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.input-group.shake {
    animation: shake 0.3s ease-in-out;
    animation-iteration-count: 1;
}

.footer-right-aligned {
    position: fixed;
    right: 5px;
    top: 65px;
    z-index: 1000;
    min-width: 65px;
    text-align: center;
    padding: 8px 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background: #dedede;
}

.about-link {
    color: #000;
    font-size: 12px;
    text-decoration: none;
    font-family: Arial, sans-serif;
    display: inline-block;
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.about-link:hover {
    color: #004499;
    text-decoration: underline;
}


.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-modal-content {
    background: #f0fff0;
    padding: 25px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 20px;
}

.modal-title {
    margin-top: 0;
    color: #333;
    font-size: 1.25rem;
}

.modal-desc {
    line-height: 1.5;
    color: #000;
    font-size: large;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.login-modal-btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.login-modal-btn-cancel {
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.login-modal-btn-confirm {
    background: #4CAF50;
    color: white;
    border: none;
}

.login-countdown-bar {
    margin: 20px 0;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.login-countdown-progress {
    height: 100%;
    width: 100%;
    background: #4CAF50;
    border-radius: 3px;
    transition: width 1s linear;
}

.login-button.loading {
    pointer-events: none;
    cursor: default;
    opacity: 0.8;
}

.login-button .fa-spinner {
    margin-right: 5px;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 20px auto;
    max-width: 750px;
    padding: 20px;
    justify-content: center;
}
.template-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.image-container {
    position: relative;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
}
.template-card img {
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid #ddd;
    transition: transform 0.5s ease;
    cursor: zoom-in;
    display: block;
}
.template-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #03a9f4;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.template-info h3 {
    margin: 0;
    color: #fff;
    font-size: 1em;
}
.template-info input[type="radio"] {
    margin: 0;
    cursor: pointer;
}
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
.select-button, .preview-button {
    display: block;
    padding: 10px 25px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}
.select-button:hover {
    background-color: #0056b3;
}
.preview-button {
    background-color: #6c757d;
}
.preview-button:hover {
    background-color: #5a6268;
}
.form-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.form-group label {
    font-weight: bold;
    margin-bottom: 0;
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
}
.global-options-container {
    margin-top: 40px;
    padding: 20px;
    border-top: 2px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 750px;
    margin: 40px auto;
}
.radio-options {
    display: flex;
    align-items: center;
    gap: 10px;
}
.radio-options input[type="radio"] {
    margin: 0;
    cursor: pointer;
}
.radio-options label {
    font-weight: normal;
    margin-bottom: 0;
    font-size: 1em;
    color: #333;
}
.zoomed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: zoom-out;
}
.zoomed img {
    max-width: 90%;
    max-height: 90%;
    border: none;
    border-radius: 8px;
}
