/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Full Page Layout */
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('../images/landingpage.jpeg') no-repeat center center/cover;
    color: #fff;
    padding: 1rem;
}

/* Main Container */
.container {
    display: flex;
    width: 90%;
    max-width: 1200px;
    min-height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    flex-direction: row;
}

/* Left Panel */
.left-panel {
    background: #6509bb;
    color: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

.left-panel h1 {
    font-size: 1.5rem;
    margin-top: 1rem;
}

/* Custom Image Styling */
.left-panel img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    transition: transform 0.3s ease-in-out;
}

/* Right Panel */
.right-panel {
    flex: 1;
    background: #2a2929;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Form Box */
.form-box {
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.form-box h2 {
    font-size: clamp(1.5rem, 5vw, 1.75rem);
    margin-bottom: 1.5rem;
}

/* Form Elements */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-wrapper {
    position: relative;
}

input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #222;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus {
    outline: none;
    border: 1px solid #6509bb;
}

/* Password Toggle Icon */
.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #ccc;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #fff;
}

/* Buttons */
button {
    width: 100%;
    padding: 0.75rem;
    background: #49028b;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

button:hover {
    background: #6509bb;
}

/* Login Toggle Buttons */
.login-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.login-option {
    padding: 0.5rem 1rem;
    background: #333;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.login-option.active {
    background: #6509bb;
}

.login-option:hover {
    background: #49028b;
}

/* Barcode Styles */
.barcode-group {
    position: relative;
}

.barcode-error {
    color: #fed7d7;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

#barcodeImage, #registerBarcodeImage {
    margin-top: 10px;
    max-width: 200px;
    max-height: 100px;
    display: none;
}

/* Links */
a {
    color: #6509bb;
    text-decoration: none;
    font-size: 0.9rem;
}

a:hover {
    text-decoration: underline;
}

/* Form Toggle */
.form-toggle {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Hidden Class */
.hidden {
    display: none;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Message Styles */
.message {
    position: relative;
    padding: 0.75rem 2rem 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease;
}

.message.success {
    background: #c6f6d5;
    color: #2f855a;
    border: 1px solid #2f855a;
}

.message.error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #c53030;
}

.message-content {
    flex: 1;
}

.message-close {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.message-close:hover {
    opacity: 1;
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade Out Animation */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
        max-width: 100%;
    }

    .left-panel, .right-panel {
        flex: none;
        width: 100%;
        padding: 1.5rem;
    }

    .left-panel img {
        max-width: 200px;
    }

    .left-panel h1 {
        font-size: 1.25rem;
    }

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

    .form-box h2 {
        font-size: 1.5rem;
    }

    input, button {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .toggle-password {
        font-size: 1.25rem;
    }

    .login-option {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}

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

    .container {
        border-radius: 8px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    }

    .left-panel, .right-panel {
        padding: 1rem;
    }

    .left-panel img {
        max-width: 150px;
    }

    .left-panel h1 {
        font-size: 1rem;
    }

    .form-box h2 {
        font-size: 1.25rem;
    }

    input, button {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .toggle-password {
        font-size: 1.1rem;
    }

    .form-toggle {
        font-size: 0.8rem;
    }

    .login-option {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
}