* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
}

header p {
    font-size: 14px;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card h2 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8ecf1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #219a52;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.activity-list {
    list-style: none;
}

.activity-item {
    padding: 15px;
    border: 1px solid #e8ecf1;
    border-radius: 6px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.activity-item:hover {
    border-color: #3498db;
    background-color: #f8fbfd;
}

.activity-info h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.activity-info p {
    font-size: 13px;
    color: #7f8c8d;
}

.activity-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    margin-left: 8px;
}

.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.global-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.global-loading-content {
    background: white;
    padding: 40px 50px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.global-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.global-loading-content p {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 500;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.date-select-modal {
    max-width: 500px;
}

.date-select-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.date-select-buttons .btn {
    width: 100%;
    padding: 15px 12px;
    font-size: 14px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table th,
table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #e8ecf1;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

table tr:hover {
    background-color: #f8fbfd;
}

footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 13px;
    margin-top: 30px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    color: #1565c0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 25px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.time-controls {
    background: #8080801a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.time-controls h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: black;
    font-size: 16px;
}

.volunteer-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.volunteer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.volunteer-table th {
    /*background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);*/
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    /*color: #2e7d32;*/
    /*border-bottom: 2px solid #a5d6a7;*/
    position: sticky;
    top: 0;
}

.volunteer-table td {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.volunteer-table tr:hover {
    background-color: #f5f5f5;
}

.volunteer-table tr.inactive {
    opacity: 0.5;
    background-color: #fafafa;
}

.volunteer-table input[type="text"],
.volunteer-table input[type="time"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    min-width: 100%;
    text-align: center;
}

.volunteer-table input[type="text"]:focus,
.volunteer-table input[type="time"]:focus {
    outline: none;
    border-color: #3498db;
}

.volunteer-table .duration {
    background-color: #f0f4f8;
    font-weight: 500;
    color: #2c3e50;
}

.btn-toggle {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
}

.btn-toggle.active {
    background-color: red;
    color: white;
}

.btn-toggle.inactive {
    background-color: #95a5a6;
}

.btn-toggle.inactive:hover {
    background-color: #7f8c8d;
}

@media (max-width: 768px) {
    header {
        padding: 20px 15px;
    }

    header h1 {
        font-size: 22px;
    }

    .card {
        padding: 20px;
    }

    .activity-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .activity-actions {
        margin-top: 12px;
        width: 100%;
    }

    .activity-actions .btn {
        margin-left: 0;
        margin-right: 8px;
    }

    .modal {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row .form-group {
        min-width: 100%;
    }
}
