/* Global Styles */
:root {
    --primary-color: #1a237e;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --background-color: #f5f5f5;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: var(--background-color);
}

/* Header Styles */
.header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
}

/* Page Title */
.page-title {
    background-color: #e3f2fd;
    color: #d32f2f;
    text-align: center;
    padding: 1rem;
    margin: 2rem auto;
    max-width: 800px;
    border-radius: 10px;
    font-size: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Content Layout */
.content-layout {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    gap: 2rem;
    padding: 0 1rem;
}

/* Sidebar */
.sidebar {
    width: 200px;
}

.sidebar-button {
    background-color: #e0e0e0;
    color: #333;
    padding: 1rem;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
    display: block;
    margin-bottom: 1rem;
}

.sidebar-button:hover {
    background-color: #bdbdbd;
}

/* Main Content */
.main-content {
    flex: 1;
    background-color: #fff3e0;
    padding: 2rem;
    border-radius: 10px;
}

/* Subjects Grid */
.subjects-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subject-button {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 1rem;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

.subject-button:hover {
    background-color: #1976d2;
}

/* PDF Items */
.pdf-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.pdf-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: transform 0.2s;
    cursor: pointer;
}

.pdf-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.pdf-link {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    margin: 2% auto;
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.close-modal {
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    background-color: var(--accent-color);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.modal-buttons {
    position: absolute;
    left: 70px;
    top: 20px;
    display: flex;
    gap: 10px;
}

.download-button {
    background-color: #27ae60;
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.download-button:hover {
    background-color: #219a52;
}

.pdf-preview {
    width: 100%;
    height: calc(100% - 60px);
    margin-top: 60px;
    border: none;
}

/* Footer */
.footer {
    background-color: #303f9f;
    color: var(--white);
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: space-around;
    max-width: 800px;
    margin: 0 auto;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .nav-menu {
        display: none;
    }
}
