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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

/* Demo Notice */
.demo-notice {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.95em;
}

/* Stats Bar */
.stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    text-align: center;
    flex: 1;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.day-box {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.day-box.available {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    border: 2px solid #84fab0;
}

.day-box.available:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(132, 250, 176, 0.4);
}

.day-box.claimed {
    background: #f0f0f0;
    border: 2px solid #ddd;
    cursor: default;
}

.day-number {
    font-size: 1.5em;
    color: #333;
}

.day-amount {
    font-size: 0.9em;
    color: #555;
    margin-top: 5px;
}

.day-box.claimed .donor-name {
    position: absolute;
    bottom: 5px;
    font-size: 0.7em;
    color: #888;
    text-align: center;
    width: 100%;
    padding: 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #000;
}

.modal h2 {
    color: #333;
    margin-bottom: 10px;
}

.modal-amount {
    font-size: 1.5em;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

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

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    text-align: center;
    padding: 20px;
    color: #667eea;
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
    color: #666;
}

.admin-link {
    display: inline-block;
    margin-top: 10px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
}

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

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

    .container {
        padding: 20px 15px;
        border-radius: 15px;
    }

    h1 {
        font-size: 1.6em;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 0.95em;
    }

    .stats {
        gap: 10px;
        margin-bottom: 25px;
    }

    .stat-box {
        padding: 15px 20px;
        min-width: 100px;
    }

    .stat-number {
        font-size: 1.5em;
    }

    .stat-label {
        font-size: 0.85em;
    }

    /* FIXED: Force 7 columns on mobile (like a week) */
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
    }

    .day-box {
        padding: 8px 4px;
    }

    .day-number {
        font-size: 1.1em;
    }

    .day-amount {
        font-size: 0.75em;
        margin-top: 2px;
    }

    .day-box.claimed .donor-name {
        font-size: 0.6em;
        bottom: 3px;
        padding: 0 2px;
    }

    .modal-content {
        padding: 30px 20px;
        margin: 15% auto;
        width: 95%;
    }

    .modal h2 {
        font-size: 1.5em;
    }

    .modal-amount {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.4em;
    }

    .container {
        padding: 15px 10px;
    }

    .stats {
        gap: 8px;
    }

    .stat-box {
        padding: 12px 15px;
        min-width: 90px;
    }

    .stat-number {
        font-size: 1.3em;
    }

    /* Even tighter on very small screens */
    .calendar-grid {
        gap: 5px;
    }

    .day-number {
        font-size: 1em;
    }

    .day-amount {
        font-size: 0.7em;
    }
}

/* Very small screens - compact mode */
@media (max-width: 360px) {
    .calendar-grid {
        gap: 4px;
    }

    .day-number {
        font-size: 0.95em;
    }

    .day-amount {
        font-size: 0.65em;
    }

    .stat-number {
        font-size: 1.2em;
    }
}