body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8;
    text-align: center;
    padding-top: 100px;
    margin: 0;
}

h1 {
    color: #2c3e50;
}

.quote {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 40px;
    font-style: italic;
}

.button-group {
    margin-top: 20px;
}

.button-group .btn {
    display: inline-block;
    margin: 10px;
    padding: 15px 30px;
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.button-group .btn:hover {
    background-color: #357ABD;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 32px;
    padding: 0 10px;
}

.card {
    background: #e3f0fc;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.08);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s, background 0.2s;
    text-align: center;
}

.card:hover {
    background: #d0e6fa;
    box-shadow: 0 8px 24px rgba(44, 62, 80, 0.15);
}

.filename {
    font-weight: 600;
    margin-bottom: 14px;
    color: #010101;
    word-break: break-all;
    font-size: 1.05rem;
}

.download-btn {
    background-color: #2563eb; /* Changed from green to blue */
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background-color: #1d4ed8; /* Darker blue for hover */
}

.download-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.btn {
    font-size: 1.2rem; /* Larger font size */
    padding: 14px 20px; /* More padding */
    border-radius: 8px; /* Rounded corners */
}

input[type="file"], input[type="text"] {
    font-size: 1.2rem; /* Larger font size */
    padding: 12px; /* More padding */
    border-radius: 6px; /* Rounded corners */
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.form-label {
    font-size: 1rem;
    color: #2563eb;
    margin-bottom: 8px;
}

.form-input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    font-size: 1rem;
    width: 100%;
}

.create-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.create-form input[type="text"], .create-form input[type="file"] {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    font-size: 1.2rem;
    width: 100%;
}

.create-form .btn {
    font-size: 1.2rem;
    padding: 14px 20px;
    border-radius: 8px;
    background-color: #2563eb;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.create-form .btn:hover {
    background-color: #1d4ed8;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.form-inline input[type="text"], .form-inline input[type="file"] {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    font-size: 1rem;
}

.form-inline .btn {
    padding: 10px 20px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.form-inline .btn:hover {
    background: #1d4ed8;
}

.subjects-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.subject-card {
    background: #e3f0fc;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.subject-card strong {
    color: #2563eb;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* === Subject Page Styling === */
.subject-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.subject-header h2 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.subject-header p {
    color: #357ABD;
    font-size: 1.1rem;
}

.resource-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.resource-item {
    background: #f8fafc;
    border: 1px solid #e3f0fc;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.resource-item h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.btn-resource {
    display: inline-block;
    padding: 10px 25px;
    background-color: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-resource:hover {
    background-color: #1d4ed8;
}

.resource-unavailable {
    color: #999;
    font-style: italic;
}

.notes-section h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.file-list {
    list-style: none;
    padding: 0;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.1);
}

.file-name {
    font-weight: 500;
    color: #333;
    flex-grow: 1;
    margin-right: 20px;
}

.no-files-message {
    color: #777;
    font-size: 1.1rem;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
}

/* === Responsive Selection Page Styling === */
.selection-header {
    text-align: center;
    margin-bottom: 40px;
}

.selection-header h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.selection-header p {
    font-size: 1.2rem;
    color: #357ABD;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    max-width: 900px; /* Constrain the grid's width on large screens */
    margin: 0 auto;   /* Center the grid horizontally */
}

.selection-item {
    display: block;
    background-color: #fff;
    color: #2563eb;
    text-decoration: none;
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.selection-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
    background-color: #2563eb;
    color: #fff;
}

/* Media query for smaller screens */
@media (max-width: 600px) {
    .btn {
        display: block;
        width: 80%;
        margin: 10px auto;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .card {
        padding: 18px 8px;
    }
    .selection-header h2 {
        font-size: 2rem;
    }
    .selection-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
        gap: 15px;
    }
    .selection-item {
        font-size: 1.2rem;
        padding: 25px 20px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 1rem; /* Adjust font size for smaller screens */
    }

    .container {
        width: 90%; /* Make the container width responsive */
        padding: 16px; /* Reduce padding for smaller screens */
    }

    h2 {
        font-size: 1.5rem; /* Adjust heading size */
    }

    input[type="text"], select {
        font-size: 1rem; /* Increase input and dropdown font size */
        padding: 10px; /* Add padding for touch-friendly inputs */
        width: 100%; /* Make inputs take full width */
    }

    .btn {
        font-size: 1.2rem; /* Increase button font size */
        padding: 12px; /* Add padding for touch-friendly buttons */
        width: 100%; /* Make buttons take full width */
    }

    .subjects-list {
        grid-template-columns: 1fr; /* Stack subjects vertically on small screens */
    }
}

.no-content-message {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8fafc;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    max-width: 600px;
    margin: 20px auto;
}

.no-content-message p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 25px;
}

.back-link-container {
    text-align: center;
    margin-top: 40px;
}

.back-link {
    display: inline-block;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.back-link:hover {
    text-decoration: underline;
}

.motivational-quote {
    font-size: 1.1rem;
    color: #555;
    margin-top: 15px;
    font-style: italic;
    font-weight: 400;
}
