/* General Resets & Base Styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: #1a1a2e; /* Dark blue/purple background */
    color: #e0e0e0; /* Light text color */
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: #9fa8da; /* Lighter purple for links */
    text-decoration: none;
}
a:hover {
    color: #c5cae9;
}

/* --- Landing Page --- */
.landing-page {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #16222A 0%, #3A6073 100%);
}
.landing-container {
    padding: 20px;
}
.brand-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem; /* Large and impactful */
    color: #ffffff;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}
.tagline {
    font-size: 1.5rem;
    color: #d1d1d1;
    margin-bottom: 2rem;
}
.landing-actions .btn {
    margin: 0 10px;
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* --- Auth Pages (Login/Register) --- */
.auth-page {
    justify-content: center;
    align-items: center;
}
.auth-container {
    background-color: #24243e; /* Slightly lighter than body */
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.auth-container h2 {
    color: #e0e0e0;
    margin-bottom: 25px;
}
.form-group {
    margin-bottom: 20px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #b0b0b0;
}
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #4a4a6a;
    border-radius: 4px;
    background-color: #1a1a2e;
    color: #e0e0e0;
    font-size: 1rem;
}
.auth-switch {
    margin-top: 20px;
    font-size: 0.9rem;
}
.auth-message {
    margin-top: 15px;
    color: #ff6b6b; /* Red for errors */
}
.auth-message.success {
    color: #6bcb77; /* Green for success */
}


/* --- Dashboard Page --- */
.dashboard-page {
    background-color: #1e1e38; /* Slightly different dark shade */
}
.dashboard-header {
    background-color: #2a2a4a;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.dashboard-header h1 {
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    font-size: 1.8rem;
    color: #fff;
}
#userGreeting {
    margin-right: 15px;
    color: #c5cae9;
}
.dashboard-main {
    padding: 30px;
    flex-grow: 1;
}
.gate-management h2 {
    border-bottom: 2px solid #4a4a6a;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #e0e0e0;
}
.gate-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.gate-item {
    background-color: #2c2c4c;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}
.gate-item h3 {
    margin-top: 0;
    color: #fff;
}
.gate-status {
    font-weight: bold;
}
.gate-status.open { color: #6bcb77; } /* Green */
.gate-status.closed { color: #ff6b6b; } /* Red */
.gate-actions {
    margin-top: auto; /* Pushes buttons to the bottom */
    padding-top: 15px;
    display: flex;
    gap: 10px;
}
.btn-gate-control, .btn-share-gate {
    flex-grow: 1;
}

/* --- Buttons --- */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-align: center;
}
.btn:active {
    transform: scale(0.98);
}
.btn-primary {
    background-color: #7e57c2; /* Purple */
    color: white;
}
.btn-primary:hover {
    background-color: #673ab7;
}
.btn-secondary {
    background-color: #5c6bc0; /* Indigo */
    color: white;
}
.btn-secondary:hover {
    background-color: #3f51b5;
}
.btn-small {
    padding: 8px 12px;
    font-size: 0.9rem;
}
.btn-gate-control.open { background-color: #4CAF50; color: white; } /* Green */
.btn-gate-control.open:hover { background-color: #45a049; }
.btn-gate-control.close { background-color: #f44336; color: white; } /* Red */
.btn-gate-control.close:hover { background-color: #da190b; }
.btn-share-gate { background-color: #2196F3; color: white; } /* Blue */
.btn-share-gate:hover { background-color: #1e88e5; }

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background-color: #2c2c4c;
    margin: auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}
.close-modal-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-modal-btn:hover,
.close-modal-btn:focus {
    color: #fff;
    text-decoration: none;
}
#generatedLinkContainer input[type="text"] {
    width: calc(100% - 80px); /* Adjust based on button width */
    margin-right: 10px;
}

/* Font Awesome Icons */
.fas { margin-right: 5px; }