* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.8em;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.content {
    padding: 15px;
}

.day-section {
    margin-bottom: 25px;
}

.day-title {
    font-size: 1.5em;
    color: #667eea;
    margin-bottom: 12px;
    margin-top: 40px;
    padding: 10px;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.schedule-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.schedule-table th {
    padding: 12px 8px;
    text-align: center;
    font-size: 0.9em;
    font-weight: 600;
}

.schedule-table th:first-child {
    text-align: left;
    padding-left: 12px;
    max-width: 60px;
}

.schedule-table td {
    padding: 10px 8px;
    border: 1px solid #e9ecef;
    vertical-align: center;
}

.schedule-table tbody tr:hover {
    background: #f8f9fa;
}

.time-cell {
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
    background: #f8f9fa;
    padding-left: 12px !important;
    white-space: nowrap;
}

.slot-cell {
    min-height: 60px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9em;
}

.slot-cell:hover {
    background: #f0f7ff;
}

.slot-empty {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
}

.slot-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.volunteer-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
}

.volunteer-icon {
    font-size: 1.2em;
}

.slot-full {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.slot-full-overlay {
    background: #e8f5e9;
    pointer-events: none;
}

.slot-capacity {
    position: absolute;
    top: 4px;
    right: 4px;
    background: white;
    color: #667eea;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 10;
}

.slot-capacity.full {
    background: #dc3545;
    color: white;
}

.signup-button {
    background: #fafafa;
    color: #6c757d;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    font-size: 0.95em;
    font-style: italic;
    text-align: center;
}

.signup-button:hover {
    transform: translateY(-1px);
}

.signup-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.stat-number {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.legend {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.legend-empty {
    background: #fafafa;
    border: 1px solid #ddd;
}

.legend-partial {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.legend-full {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 1.5em;
    color: #667eea;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
}

.modal-slot-info {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9em;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.btn {
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-confirm {
    background: #28a745;
    color: white;
}

.btn-confirm:hover {
    background: #218838;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
}

@media (max-width: 600px) {
    body {
        padding: 8px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .schedule-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .schedule-table th {
        max-width: 120px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        z-index: 1;
        position: relative;
    }

    .schedule-table th, .schedule-table td {
        min-width: 100px;
    }
    .schedule-table th:first-child, .schedule-table td:first-child {
        position: sticky;
        left: 0;
        background: inherit;
        z-index: 15;
        max-width : 60px;
    }
    .schedule-table td:first-child {
        background-color: white;
    }
    .schedule-table th:first-child {
        border-collapse: collapse;
        background: #667eea;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 8px;
        font-size: 0.85em;
    }
}

@media (min-width: 601px) {
    .header h1 {
        font-size: 2em;
    }

    .stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .schedule-table th {
        font-size: 1em;
    }

    .schedule-table td {
        font-size: 0.95em;
    }

    .schedule-table th:first-child, .schedule-table td:first-child {
        position: sticky;
        left: 0;
        background: inherit;
        z-index: 1;
    }
    .schedule-table td:first-child {
        background-color: white;
    }
    .schedule-table th:first-child {
        border-collapse: collapse;
    }
}