:root {
    --primary-color: #2c3e50;
    --primary-color-dark: #212f3c;
    --secondary-color: #e74c3c;
    --background-color: #ecf0f1;
    --text-color: #34495e;
    --link-color: #3498db;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header styles */
.main-nav {
    background-color: var(--primary-color);
    padding: 1rem 0;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    color: white;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
}

/* Main content styles */
main {
    padding: 2rem 0;
}

h1, h2, h3 {
    margin-bottom: 1rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #c0392b;
}

/* Footer styles */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    margin-right: 2rem;
    margin-bottom: 1rem;
}

.footer-section:last-child {
    margin-right: 0;
}

.footer-section h3 {
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    .menu-toggle {
        display: block;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
}

/* Dashboard styles */
.dashboard-stats {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.stat-card:last-child {
    margin-right: 0;
}

.stat-card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: var(--primary-color);
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Message styles */
.success, .error {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.success {
    background-color: var(--success-color);
    color: white;
}

.error {
    background-color: var(--error-color);
    color: white;
}

/* Home page styles */
.home-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 2rem;
}

.home-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 400px;
    padding: 2rem;
    border-radius: 4px;
}

.welcome-info {
    background-color: var(--primary-color);
    color: white;
}

.login-form {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-form .button {
    align-self: flex-start;
}

.welcome-info h1 {
    color: white;
    margin-bottom: 1rem;
}

.welcome-info ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.welcome-info li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.welcome-info li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.login-form h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Additional utility classes */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.small {
    font-size: 0.875rem;
}

.danger {
    background-color: var(--error-color);
}

.danger:hover {
    background-color: #c0392b;
}

/* Responsive styles for home page */
@media (max-width: 768px) {
    .home-container {
        flex-direction: column;
    }

    .welcome-info,
    .login-form {
        width: 100%;
    }
}

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

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 4px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.form-actions {
    margin-top: 20px;
    text-align: right;
}

.form-actions button {
    margin-left: 10px;
}

#participantModal .form-group {
    margin-bottom: 15px;
}

#participantModal label {
    display: block;
    margin-bottom: 5px;
}

#participantModal input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#participantModal .btn {
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

#participantModal .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

#participantModal .btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

#participantModal .btn-primary:hover {
    background-color: var(--primary-color-dark);
}

#participantModal .btn-secondary:hover {
    background-color: #5a6268;
}

/* Course management styles */
.course-list {
    margin-top: 2rem;
}

#create-course-btn {
    margin-bottom: 1rem;
}

/* Responsive styles for course management */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }
}

/* Styles for new form fields */
#participantModal .form-group input[type="date"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#participantModal .form-group input[type="text"],
#participantModal .form-group input[type="email"],
#participantModal .form-group input[type="password"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#participantModal .form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

#participantModal .form-group input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Table styles */
.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: .75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: var(--primary-color);
    color: white;
}

/* Button styles */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-danger {
    color: #fff;
    background-color: var(--error-color);
    border-color: var(--error-color);
}

.btn-info {
    color: #fff;
    background-color: var(--link-color);
    border-color: var(--link-color);
}

.btn-sm {
    padding: .25rem .5rem;
    font-size: .875rem;
    line-height: 1.5;
    border-radius: .2rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

/* Login page styles */
.home-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.login-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
}

.login-container h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.welcome-text {
    margin-bottom: 1.5rem;
    color: #666;
}

.login-form h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.login-form input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-form .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

/* Role selection styles */
.role-selection-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.role-selection-container h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.role-selection-form {
    margin-top: 1.5rem;
}

.role-options {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.role-option {
    flex: 1;
    margin-right: 1rem;
}

.role-option:last-child {
    margin-right: 0;
}

.role-label {
    display: block;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-option input[type="radio"] {
    display: none;
}

.role-option input[type="radio"]:checked + .role-label {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.role-selection-form .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

