﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.header {
    width: 100%;
    padding: 20px 0 180px 0; /* Increased bottom padding for more black area */
    background: #000;
    text-align: center;
    position: relative;
}

    .header img {
        max-width: 480px;
        height: auto;
    }

/* REMOVED negative margin and use proper flex positioning */
.content-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top instead of center */
    padding: 0 20px 20px 20px;
    position: relative;
    margin-top: -100px; /* Small negative margin to overlap black area */
}

.login-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    padding: 25px 35px 15px 35px;
    position: relative;
    z-index: 2; /* Ensure it's above the black area */
}

h2 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 400;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    color: #666;
    margin-bottom: 5px;
    font-size: 13px;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    transition: border-color 0.3s;
}

    input[type="email"]:focus,
    input[type="password"]:focus {
        outline: none;
        border-color: #000;
    }

.btn-login {
    width: 100%;
    padding: 11px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

    .btn-login:hover {
        background: #333;
    }

.footer-text {
    text-align: right;
    margin-top: 12px;
    color: #999;
    font-size: 13px;
    padding-top: 5px;
}

.alert {
    padding: 10px 12px;
    margin-bottom: 18px;
    border-radius: 4px;
    font-size: 13px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.text-danger {
    color: #dc3545;
    font-size: 12px;
    margin-top: 3px;
}

/* Better responsive approach */
@media (max-width: 768px) {
    .header {
        padding: 20px 0 140px 0; /* Adjusted for tablet */
    }

    .content-wrapper {
        margin-top: -80px; /* Less negative margin on tablet */
    }
}

@media (max-width: 480px) {
    .header {
        padding: 30px 0 120px 0;
    }

        .header img {
            max-width: 200px;
        }

    .content-wrapper {
        margin-top: -60px; /* Even less on mobile */
        padding: 0 15px 15px 15px;
        align-items: flex-start; /* Keep aligned to top */
    }

    .login-container {
        padding: 20px 25px 12px 25px;
        max-width: 100%; /* Full width on mobile */
    }

    h2 {
        margin-bottom: 18px;
        font-size: 22px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .btn-login {
        margin-top: 6px;
        padding: 10px;
    }

    .footer-text {
        margin-top: 10px;
        font-size: 12px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .header {
        padding: 20px 0 100px 0;
    }

    .content-wrapper {
        margin-top: -50px;
    }
}
