/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;

}

.main-text{
    text-align: center;
}

/* Page layout */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
}

.logout-form {
    margin: 0;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Footer */
.site-footer {
    background-color: #343a40;
    color: rgba(255,255,255,0.7);
    padding: 1.5rem 0;
    margin-top: auto;
}

.site-footer p {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Forms and buttons */
form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

form h2 {
    margin-bottom: 1.5rem;
    color: #495057;
    
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

input[type="email"],
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Alerts */
.alert {
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.alert-error {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
}

.alert-message {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.alert-close:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Home page */
.home-hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.home-hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #495057;
    text-align: center;
}

.home-hero p {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.home-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Dashboard */
.dashboard-welcome {
    text-align: center;
    margin-bottom: 2rem;
}

.dashboard-welcome h2 {
    font-size: 2rem;
    color: #495057;
    margin-bottom: 1rem;
}

.dashboard-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .home-hero h2 {
        font-size: 2rem;
    }
    
    .home-hero p {
        font-size: 1rem;
    }
    
    .home-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    form {
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 0;
    }
    
    form {
        padding: 1.5rem;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add to existing styles.css */

/* Search Section */
.search-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-form input {
    flex: 1;
    min-width: 200px;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Form Row */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Lockers Grid */
.lockers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.locker-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.locker-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.locker-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
}

.locker-header h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.username {
    font-size: 0.9rem;
    opacity: 0.9;
}

.locker-details {
    padding: 1rem;
}

.locker-item {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.locker-item:last-child {
    margin-bottom: 0;
}

.locker-meta {
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid #e9ecef;
}

.locker-meta small {
    color: #6c757d;
}

/* No Lockers */
.no-lockers {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.no-lockers p {
    margin-bottom: 1rem;
    color: #6c757d;
}

/* Actions Bar */
.actions-bar {
    margin-bottom: 1.5rem;
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form input,
    .search-form button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .lockers-grid {
        grid-template-columns: 1fr;
    }
}

/* Ad styling */
.ad-container {
    margin: 20px 0;
    text-align: center;
}

.ad-section {
    margin: 20px 0;
    padding: 10px 0;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.ad-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 5px;
}

/* Responsive ads */
@media (max-width: 768px) {
    .ad-container ins {
        max-width: 100%;
    }
}

/* Prevent ads from breaking layout */
.ad-container + .ad-container {
    margin-top: 30px;
}

/* Test ad styling */
.test-ad {
    border: 2px dashed #007bff !important;
    background: #f8f9ff !important;
    padding: 20px !important;
    text-align: center !important;
    margin: 20px 0 !important;
    border-radius: 8px !important;
}

.test-ad .test-ad-label {
    color: #007bff !important;
    font-weight: bold !important;
    margin-bottom: 10px !important;
    font-size: 16px !important;
}

.test-ad .test-ad-description {
    color: #666 !important;
    font-size: 14px !important;
    margin-bottom: 10px !important;
}

.test-ad .test-ad-info {
    color: #999 !important;
    font-size: 12px !important;
}