/* General Reset */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

/* 1. MAKE BODY TAKE FULL HEIGHT */
body { 
    background-color: hsl(216, 20%, 95%); 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; /* This is crucial */
}

/* Navbar */
.navbar { 
    background-color: #2c3e50; 
    padding: 15px 30px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    width: 100%;
    z-index: 100;
    flex-shrink: 0; /* Prevents navbar from shrinking */
}

.navbar .logo { color: white; font-size: 24px; font-weight: bold; text-decoration: none; }
.nav-links a { color: #ecf0f1; text-decoration: none; margin-left: 20px; font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: #3498db; }

/* 2. MAIN CONTAINER - THE FIX IS HERE */
.container { 
    /* Take up all available space between header and footer */
    flex-grow: 1; 
    width: 100%;
    max-width: 1000px; 
    padding: 20px;

    /* Center Content Logic */
    display: flex;
    flex-direction: column; 
    justify-content: center; /* Centers Vertically */
    align-items: center;     /* Centers Horizontally */
    
    /* Margin auto helps center the container itself if max-width is hit */
    margin: 0 auto; 
}

/* Cards (Login/Register) */
.card { 
    background: white; 
    padding: 40px; 
    border-radius: 10px; 
    box-shadow: 0 8px 16px rgba(0,0,0,0.1); 
    width: 100%;
    max-width: 450px; 
    transition: transform 0.3s; 
    text-align: left; 
}
.card:hover { transform: translateY(-5px); }
.card h2 { color: #2c3e50; margin-bottom: 20px; border-bottom: 2px solid #3498db; padding-bottom: 10px; }

/* Forms */
input { width: 100%; padding: 12px; margin: 10px 0; border: 1px solid #ccc; border-radius: 5px; transition: 0.3s; }
input:focus { border-color: #3498db; outline: none; box-shadow: 0 0 5px rgba(52, 152, 219, 0.5); }
.btn { width: 100%; padding: 12px; background: #3498db; color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; transition: 0.3s; margin-top: 10px; }
.btn:hover { background: #2980b9; }

/* Book Grid 

[Image of Bookstore Layout]
 */
.book-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px; 
    width: 100%; 
}
.book-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 8px rgba(0,0,0,0.1); text-align: center; padding-bottom: 20px; }
.book-img { width: 100%; height: 200px; background: #ddd; object-fit: cover; }
.book-info { padding: 15px; }

/* Success Page Specifics */
.success-card {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 100%;
}
.checkmark { color: #2ecc71; font-size: 60px; margin-bottom: 20px; }
.data-box {
    background: #2c3e50;
    color: #00ff00; 
    font-family: 'Courier New', monospace;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: left;
    font-size: 14px;
    word-break: break-all;
}

/* Alerts */
.alert { 
    padding: 15px; 
    background: #dff9fb; 
    border-left: 5px solid #3498db; 
    margin-bottom: 20px; 
    border-radius: 4px; 
    color: #2c3e50;
    width: 100%;
}

/* Footer */
footer { 
    background: #2c3e50; 
    color: white; 
    text-align: center; 
    padding: 20px; 
    width: 100%;
    flex-shrink: 0; /* Prevents footer from squishing */
}