
/* Modal Background */
.modal {
    display: none;
    position: fixed;
    z-index: 1000; /* Ensure it's on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6); /* Slightly darker for better contrast */
    backdrop-filter: blur(5px); /* Modern blur effect */
}

/* Modal Content Box */
.modal-content {
    background-color: #fff;
    margin: 5% auto; /* Less top margin for better centering on small screens */
    padding: 25px;
    border: 1px solid #888;
    width: 90%; /* Default to 90% for mobile-first */
    max-width: 450px; /* Cap width on larger screens */
    border-radius: 8px; /* Softer corners */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: fadeIn 0.3s;
}

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

/* Close Button */
.close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    transition: 0.3s;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
}

.signup-form {
    width: 100%; /* Take full width of modal content */
}

.signup-form h2, .modal-content h2 {
    color: #636363;
    margin: 0 0 20px;
    position: relative;
    text-align: center;
    font-family: monospace; /* Use font from index.html if available, or fallback */
}

.signup-form p.hint-text {
    color: #999;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

/* Input Fields */
input[type="text"],
input[type="password"],
input[type="email"],
.form-control {
    width: 100%; /* Full width */
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
    font-size: 16px; /* readable on mobile */
    transition: border-color 0.3s;
}

input:focus,
.form-control:focus {
    border-color: #009688; /* Match theme color */
    outline: none;
}

/* Buttons */
button[type="submit"],
.btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    background-color: #009688; /* Match theme color */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

button[type="submit"]:hover,
.btn:hover {
    background-color: #00796b;
}

/* Links */
.signup-form a,
.form-group a {
    color: #009688;
    text-decoration: none;
}

.signup-form a:hover {
    text-decoration: underline;
}

/* Row for dual inputs (like Name/Location) */
.row {
    display: flex;
    gap: 10px;
}

.col {
    flex: 1;
}

/* Media Queries */
@media screen and (max-width: 600px) {
    .modal-content {
        margin: 20% auto;
        width: 95%; /* Wider on very small screens */
        padding: 20px;
    }

    .row {
        flex-direction: column;
        gap: 0;
    }
    
    .col input {
        margin-bottom: 10px;
    }
}