
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
font-family: 'Poppins', sans-serif;
line-height: 1.6;
color: #525151;
background-color: rgba(0, 0, 139, 0.1);
}

.navbar {
background: linear-gradient(135deg, rgba(61, 105, 252, 0.733), rgba(79, 148, 252, 0.747));
color: rgba(255, 255, 255, 0.925);
padding: 1rem 1rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
border-radius: 10px;
width: 80%;
max-width: 1200px;
margin: 2rem auto 0 auto;
flex-wrap: wrap;
}

.logo {
display: flex;
align-items: center;
justify-content: center;
max-width: 400px;
height: auto;
object-fit: contain;
shape-outside: url(logo.png);
}

.teks-header {
display: flex;
flex-direction: column;
line-height: 1.2;
}

.baris-atas {
font-size: 16px;
font-weight: bold;
}

.baris-bawah {
font-size: 16px;
font-weight: bold;
}

.logo-img {
width: 50px;
height: 50px;
margin-right: 18px;
margin-left: 12px;
}

.nav-links {
display: flex;
list-style: none;
align-items: center;
}

.nav-links li {
margin-left: 1rem;
}

.nav-links a {
color: white;
text-decoration: none;
font-weight: 900;
background: transparent;
border: none;
padding: 0.5rem 1rem;
border-radius: 5px;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
transform: translateY(0);
display: flex;
align-items: center;
justify-content: center;
height: 2.5rem;
gap: 0.5rem;
}



.nav-links a:hover {
background: linear-gradient(135deg, #139cd3, #038dbb);
color: white;
transform: translateY(-3px);
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-links button {
background: transparent;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 5px;
cursor: pointer;
font-family: 'Poppins', sans-serif;
font-weight: 900;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
transform: translateY(0);
height: 2.5rem;
}

.nav-links button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
transition: left 0.5s ease;
}

.nav-links button:hover::before {
left: 100%;
}

.nav-links button:hover {
background: linear-gradient(135deg, #22a8dd, #038dbb);
color: white;
transform: translateY(-3px);
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Dropdown */
.dropdown {
position: relative;
display: inline-block;
}

.dropbtn {
background: transparent;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 5px;
cursor: pointer;
font-family: 'Poppins', sans-serif;
font-weight: 900;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
transform: translateY(0);
height: 2.5rem;
}

.dropbtn span {
margin-left: 6px;
}

.dropbtn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
transition: left 0.5s ease;
}

.dropbtn:hover::before {
left: 100%;
}

.dropbtn:hover {
background: linear-gradient(135deg, #005a7e, #038dbb);
color: white;
transform: translateY(-3px);
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.dropdown-content {
display: none;
position: absolute;
background-color: rgba(255, 255, 255, 0.95);
width: 90%;
max-width: 300px;
min-width: 200px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1002;
border-radius: 8px;
padding: 1rem;
left: 50%;
top: 100%;
transform: translateX(-50%);
}

.dropdown-content form {
display: flex;
flex-direction: column;
gap: 0.5rem;
}

.dropdown-content select,
.dropdown-content input {
width: 100%;
padding: 0.5rem;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 0.9rem;
box-sizing: border-box;
}

.dropdown-content button {
background: #007bff;
color: white;
border: none;
padding: 0.5rem;
border-radius: 4px;
cursor: pointer;
font-weight: bold;
margin-top: 0.5rem;
}

.dropdown-content button:hover {
background: #0056b3;
}

.dropdown:hover .dropdown-content {
display: block;
}

.hero {
margin: 0;

display: flex;
flex-direction: column;
min-height: 100vh;   
font-family: Arial, sans-serif;
background-color:  #525151;
}
.hero-content {
flex-grow: 1; 

display: flex;
justify-content: center;
align-items: center; 
width: 100%;
}

.hero-content img {
max-width: 1200px;
height: auto;    
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.books-section {
padding: 4rem 2rem;
background: rgba(255,255,255,0.2);
width: 95%;
max-width: 1200px;
margin: 0 auto;
}

.books-section h2 {
text-align: center;
margin-bottom: 2rem;
color: #1a202c;
}

.book-rack {
text-align: center;
margin-bottom: 2rem;
}

.rack-photo {
width: 100%;
max-width: 800px;
height: auto;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
transition: transform 0.3s;
}

.rack-photo.clickable:hover {
transform: scale(1.05);
cursor: pointer;
}

.books-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
margin-top: 2rem;
}

.book-card {
background: rgba(255,255,255,0.2);
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
overflow: hidden;
transition: transform 0.3s;
text-align: center;
}

.book-card:hover {
transform: translateY(-5px);
}

.book-info {
padding: 1rem;
}

.book-title {
font-size: 1.2rem;
font-weight: bold;
margin-bottom: 0.5rem;
color: #007bff;
}

.book-author {
font-size: 1rem;
color: #666;
margin-bottom: 0.5rem;
}

.book-synopsis {
font-size: 0.9rem;
color: #333;
margin-bottom: 1rem;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
}

.read-btn {
background: #007bff;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 5px;
cursor: pointer;
font-weight: bold;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
margin-right: 10px;
}

.read-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
transition: left 0.5s ease;
}

.read-btn:hover::before {
left: 100%;
}

.read-btn:hover {
background: #0056b3;
box-shadow: 0 0 10px rgba(0,123,255,0.5);
}

.borrow-btn {
background: #007bff;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 5px;
cursor: pointer;
font-weight: bold;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
}

.borrow-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
transition: left 0.5s ease;
}

.borrow-btn:hover::before {
left: 100%;
}

.borrow-btn:hover {
background: #0056b3;
box-shadow: 0 0 10px rgba(0,123,255,0.5);
}

.option-btn {
background: #007bff;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 5px;
cursor: pointer;
font-weight: bold;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
margin-right: 10px;
}

.option-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
transition: left 0.5s ease;
}

.option-btn:hover::before {
left: 100%;
}

.option-btn:hover {
background: #0056b3;
box-shadow: 0 0 10px rgba(0,123,255,0.5);
}

.history-section {
padding: 4rem 2rem;
background: #dbeafe;
width: 95%;
max-width: 1200px;
margin: 0 auto;
}

.history-section h2 {
text-align: center;
margin-bottom: 2rem;
color: #1a202c;
}

.stats-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
margin-bottom: 2rem;
}

.stats-card {
background: rgba(255,255,255,0.2);
padding: 1.5rem;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
text-align: center;
}

.stats-card h3 {
margin-bottom: 0.5rem;
color: #1a202c;
font-size: 1.2rem;
}

.stats-card p {
font-size: 1.5rem;
font-weight: bold;
color: #007bff;
margin: 0;
}

.history-item {
background: rgba(255,255,255,0.2);
padding: 1rem;
margin-bottom: 1rem;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-section {
padding: 4rem 2rem;
background: rgba(255,255,255,0.2);
width: 95%;
max-width: 1200px;
margin: 0 auto;
}

.admin-section h2 {
text-align: center;
margin-bottom: 2rem;
color: #1a202c;
}

.admin-content {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2rem;
}

.add-book, .student-activity, .manage-students {
background: #dbeafe;
padding: 2rem;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.manage-students form {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 20px;
}

.manage-students input {
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
}

.manage-students button {
padding: 8px 16px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}

.manage-students button:hover {
background-color: #0056b3;
}

.student-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
margin-bottom: 10px;
}

.delete-btn {
background-color: #dc3545;
color: white;
border: none;
padding: 5px 10px;
border-radius: 4px;
cursor: pointer;
}

.delete-btn:hover {
background-color: #c82333;
}

.add-book h3, .student-activity h3 {
margin-bottom: 1rem;
color: #1a202c;
}

.add-book form {
display: flex;
flex-direction: column;
}

.add-book input, .add-book textarea {
margin-bottom: 1rem;
padding: 0.5rem;
border: 1px solid #ddd;
border-radius: 5px;
}

.add-book button {
background: #007bff;
color: white;
border: none;
padding: 0.5rem;
border-radius: 5px;
cursor: pointer;
font-weight: bold;
transition: background 0.3s;
}

.add-book button:hover {
background: #0056b3;
}

.modal {
display: none;
position: fixed;
z-index: 1001;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background: rgba(61, 61, 61, 0.4);
backdrop-filter: blur(10px);
}

.modal-content {
margin-bottom: 1rem;
padding: 0.75rem;
border: 2px solid rgba(0, 123, 255, 0.2);
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.3s ease;
}

.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}

.close:hover {
color: black;
}

#login-form {
display: flex;
flex-direction: column;
}

#login-form select, #login-form input {
margin-bottom: 1rem;
padding: 0.75rem;
border: 2px solid rgba(0, 123, 255, 0.37);
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.3s ease;
}

#login-form select:focus, #login-form input:focus {
outline: none;
border-color: #007bff;
box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.password-container {
display: flex;
align-items: center;
margin-bottom: 1rem;
}

.password-container input {
flex: 1;
padding: 0.75rem;
border: 2px solid rgba(0, 123, 255, 0.2);
border-radius: 8px 0 0 8px;
box-sizing: border-box;
font-size: 1rem;
transition: border-color 0.3s ease;
}

.password-container input:focus {
outline: none;
border-color: #007bff;
box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.toggle-password {
background: #f0f0f0;
border: 2px solid rgba(0, 123, 255, 0.2);
border-left: none;
border-radius: 0 8px 8px 0;
color: #007bff;
cursor: pointer;
font-size: 0.8rem;
padding: 0.75rem 0.5rem;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.3s ease;
}

.toggle-password:hover {
background-color: rgba(0, 123, 255, 0.1);
color: #0057b3fd;
}

#login-form button {
background: #007bff;
color: white;
border: none;
padding: 0.5rem;
border-radius: 5px;
cursor: pointer;
font-weight: bold;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
}

#login-form button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
transition: left 0.5s ease;
}

#login-form button:hover::before {
left: 100%;
}

#login-form button:hover {
background: #0056b3;
box-shadow: 0 0 10px rgba(0,123,255,0.5);
}

#book-viewer {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(196, 193, 193, 0.904);
z-index: 1000;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

.viewer-header {
display: flex;
justify-content: space-between;
align-items: center;
width: 90%;
max-width: 1000px;
background: rgba(255,255,255,0.2);
padding: 1rem;
border-radius: 10px 10px 0 0;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.viewer-header h2 {
margin: 0;
color: #1a202c;
}

#close-viewer {
background: #dc3545;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 5px;
cursor: pointer;
font-weight: bold;
transition: background 0.3s;
}

#close-viewer:hover {
background: #c82333;
}

#book-viewer iframe {
width: 90%;
max-width: 1000px;
height: 70vh;
border: none;
border-radius: 0 0 10px 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#borrow-modal .modal-content {
max-width: 400px;
}

#borrow-modal form {
display: flex;
flex-direction: column;
gap: 15px;
}

#borrow-modal input,
#borrow-modal select {
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
}

#borrow-modal button {
padding: 10px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}

#borrow-modal button:hover {
background-color: #45a049;
}

#borrowed-books-section {
margin-top: 40px;
padding: 20px;
background-color: #f9f9f9;
border-radius: 8px;
}

#borrowed-books-section h2 {
color: #333;
margin-bottom: 20px;
}

#borrowed-books-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
}

.book-card.borrowed {
background-color: #fff3cd;
border: 1px solid #ffeaa7;
}

.book-card.borrowed .book-title {
color: #856404;
}

.return-btn {
background-color: #dc3545;
color: white;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
margin-top: 10px;
}

.return-btn:hover {
background-color: #c82333;
}

.input-row {
display: flex;
gap: 1rem;
margin-bottom: 1rem;
}

.input-row input {
flex: 1;
padding: 0.75rem;
border: 2px solid rgba(0, 123, 255, 0.2);
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.3s ease;
}

.input-row input:focus {
outline: none;
border-color: #007bff;
box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

@media (max-width: 768px) {
.navbar {
padding: 0.5rem;
width: 95%;
}

.nav-links li {
margin-left: 1rem;
}

.nav-links a, .nav-links button, .dropbtn {
padding: 0.4rem 0.8rem;
height: 2.2rem;
font-size: 0.9rem;
}

.dropdown-content select,
.dropdown-content input {
font-size: 0.8rem;
padding: 0.4rem;
}

.hero {
padding: 2rem 1rem;
min-height: 50vh;
}

.hero-content h1 {
font-size: 2rem;
}

.hero-content p {
font-size: 1.2rem;
}

.books-section, .history-section, .admin-section {
padding: 2rem 1rem;
}

.books-grid {
grid-template-columns: 1fr;
gap: 1rem;
}

.admin-content {
grid-template-columns: 1fr;
}

.stats-container {
grid-template-columns: 1fr;
}

.modal-content {
margin: 10% auto;
width: 90%;
}

#book-viewer iframe {
width: 95%;
height: 60vh;
}

.viewer-header {
width: 95%;
}
}

@media (max-width: 480px) {
.navbar {
padding: 0.5rem;
width: 98%;
flex-direction: column;
align-items: flex-start;
}

.logo {
margin-bottom: 0.5rem;
}

.nav-links {
flex-wrap: wrap;
width: 100%;
justify-content: flex-start;
}

.nav-links li {
margin-left: 0.5rem;
margin-bottom: 0.5rem;
}

.nav-links a, .nav-links button, .dropbtn {
padding: 0.3rem 0.5rem;
height: 2rem;
font-size: 0.8rem;
min-width: auto;
}

.dropdown-content select,
.dropdown-content input {
font-size: 0.7rem;
padding: 0.3rem;
}

.hero-content h1 {
font-size: 1.5rem;
}

.hero-content p {
font-size: 1rem;
}

.books-section, .history-section, .admin-section {
padding: 1rem 0.5rem;
}

.book-card {
margin: 0 0.5rem;
}

.modal-content {
width: 95%;
}

#book-viewer iframe {
height: 50vh;
}
}
