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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

@media (max-width: 480px) {
    .container {
        border-radius: 0;
        box-shadow: none;
    }

    body {
        padding: 0;
        background: white;
    }

    header {
        border-radius: 0;
    }

    .card {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
}

.logo {
    width: 50px;
    height: 50px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 15px;
    margin-bottom: 5px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.back-link {
    position: absolute;
    left: 40px;
    top: 40px;
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

main {
    padding: 40px;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card h2 {
    color: #667eea;
    margin-bottom: 15px;
}

.card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

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

.btn-remove {
    background: #dc3545;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-remove:hover {
    background: #c82333;
}

.btn-remove-icon {
    background: #dc3545;
    color: white;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-remove-icon:hover {
    background: #c82333;
    transform: scale(1.1);
}

.btn-remove-icon:active {
    transform: scale(0.95);
}

.event-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.event-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
}

.event-form input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.event-form-full {
    max-width: 600px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="datetime-local"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.time-slot-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.time-slot-input input {
    flex: 1;
}

#timeSlotsContainer {
    margin-bottom: 15px;
}

.success-box {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.success-box h2 {
    color: #155724;
    margin-bottom: 20px;
}

.success-box p {
    margin-bottom: 15px;
    color: #155724;
}

.event-id-box {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.event-id-box code {
    font-size: 1.2em;
    font-weight: 600;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

.event-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.event-details p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.event-details code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.availability-summary h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.availability-cards {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.availability-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
}

.availability-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.availability-card .card-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
}

.availability-card .card-header .time {
    margin: 5px 0 0 0;
    font-size: 1.5em;
    font-weight: 700;
    opacity: 0.95;
}

.availability-card .card-body {
    padding: 20px;
}

.availability-group {
    margin-bottom: 20px;
}

.availability-group:last-child {
    margin-bottom: 0;
}

.availability-group strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.05em;
}

.availability-group.available strong {
    color: #28a745;
}

.availability-group.not-available strong {
    color: #dc3545;
}

.participant-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.participant-list li {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 6px;
    border-left: 3px solid #667eea;
}

.availability-group.available .participant-list li {
    background: #d4edda;
    border-left-color: #28a745;
}

.availability-group.not-available .participant-list li {
    background: #f8d7da;
    border-left-color: #dc3545;
    opacity: 0.7;
}

.no-responses {
    color: #6c757d;
    font-style: italic;
    margin: 10px 0 0 0;
}

/* Legacy table styles - kept for backward compatibility */
.availability-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.availability-table thead {
    background: #667eea;
    color: white;
}

.availability-table th,
.availability-table td {
    padding: 15px;
    text-align: left;
}

.availability-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.availability-table tbody tr:hover {
    background: #e9ecef;
}

.submit-availability {
    margin-top: 40px;
}

.submit-availability h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    header p {
        font-size: 1em;
    }
    
    .action-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        padding: 25px;
    }

    .card h2 {
        font-size: 1.3em;
    }

    .card p {
        font-size: 0.95em;
    }
    
    .back-link {
        position: static;
        display: block;
        margin-bottom: 20px;
    }
    
    main {
        padding: 20px;
    }

    .event-form {
        flex-direction: column;
    }

    .event-form input[type="text"] {
        width: 100%;
    }

    .event-form button {
        width: 100%;
    }

    .availability-card .card-header h3 {
        font-size: 1.1em;
    }

    .availability-card .card-header .time {
        font-size: 1.3em;
    }

    .availability-card .card-body {
        padding: 15px;
    }

    .participant-list li {
        font-size: 0.95em;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.95em;
    }

    .time-slot-input {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .time-slot-input input {
        flex: 1;
        min-width: 0;
    }

    .btn-remove-icon {
        flex-shrink: 0;
    }
}

/* Footer styles */
footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    margin-top: 60px;
    text-align: center;
}

footer p {
    margin: 10px 0;
    opacity: 0.9;
}

.buy-coffee {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background: #008CFF;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 140, 255, 0.3);
}

.buy-coffee:hover {
    background: #0077dd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 140, 255, 0.4);
}

.buy-coffee::before {
    content: "☕ ";
    font-size: 1.2em;
}
