@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #333333;
    overflow-x: hidden;
}

#app-root {
    width: 100%;
    min-height: 100vh;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #fff0f5;
}

.header h1 {
    font-size: 2.5rem;
    margin: 0;
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.view-toggle {
    background: #fff0f5;
    border: 2px solid #ff69b4;
    color: #ff1493;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle:hover {
    background: #ff1493;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4);
}

.loading-state {
    text-align: center;
    font-size: 1.2rem;
    color: #ff69b4;
    padding: 50px;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Card View */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.event-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #fff0f5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.event-card.not-started {
    background: #ffffff;
    border: 1px solid #ff69b4;
}

.event-card.started {
    background: #e6f7ff;
    border: 1px solid #1890ff;
}

.event-card.ending-soon {
    background: linear-gradient(135deg, #fff0eb, #ffffff);
    border: 2px solid #ff4500;
    border-left: 8px solid #ff4500;
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.15);
}

.event-card.ending-critical {
    background: #fff1f0;
    border: 2px solid #f5222d;
    border-left: 8px solid #f5222d;
    box-shadow: 0 4px 12px rgba(245, 34, 45, 0.15);
}

.event-card.past {
    opacity: 0.6;
    filter: grayscale(100%);
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(255, 105, 180, 0.2);
}

.event-card.ending-soon:hover {
    background: #ffe6dd;
    border-color: #ff3300;
    box-shadow: 0 6px 16px rgba(255, 69, 0, 0.25);
}

.event-card.ending-critical:hover {
    background: #ffccc7;
    border-color: #cf1322;
    box-shadow: 0 6px 16px rgba(245, 34, 45, 0.25);
}

.card-image-wrapper {
    width: 100%;
    height: 200px;
    background: #fff0f5;
    overflow: hidden;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a1a1a;
    line-height: 1.4;
}

.card-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
}

.card-meta-icon {
    color: #ff69b4;
    margin-right: 8px;
    font-weight: bold;
}

.card-footer {
    margin-top: auto;
    padding-top: 16px;
}

.card-button {
    display: inline-block;
    background: #ffffff;
    color: #ff1493;
    border: 1px solid #ff1493;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.card-button:hover {
    background: #ff1493;
    color: #ffffff;
}

/* Calendar Timeline View */
.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 40px;
    width: 4px;
    background: #fff0f5;
    border-radius: 4px;
}

.timeline-item {
    position: relative;
    padding-left: 100px;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: 31px;
    top: 0;
    width: 22px;
    height: 22px;
    background: #ff1493;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 0 0 4px #fff0f5;
}

.timeline-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #fff0f5;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: 0 8px 30px rgba(255, 105, 180, 0.15);
    border-color: #ff69b4;
}

.timeline-date {
    display: inline-block;
    background: #fff0f5;
    color: #ff1493;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #333;
}

.timeline-location {
    font-size: 0.95rem;
    color: #666;
}

.timeline-thumbnail {
    margin-top: 16px;
    width: 100%;
    height: 160px;
    border-radius: 8px;
    object-fit: cover;
}

/* Calendar Month Grid View */
.calendar-container {
    padding: 20px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .calendar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .calendar-grid { grid-template-columns: 1fr; }
}

.cal-month {
    background: #ffffff;
    border: 2px solid #fff0f5;
    border-radius: 12px;
    padding: 16px;
    height: calc(100vh - 160px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cal-month.empty {
    opacity: 0.5;
    background: #fdfdfd;
}

.cal-month-title {
    margin: 0 0 16px 0;
    font-size: 1.2rem;
    color: #ff1493;
    border-bottom: 2px solid #fff0f5;
    padding-bottom: 8px;
    text-align: center;
    flex-shrink: 0;
}

.cal-events {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
    min-width: 0;
    min-height: 0;
}

.cal-events::-webkit-scrollbar {
    width: 6px;
}
.cal-events::-webkit-scrollbar-track {
    background: transparent;
}
.cal-events::-webkit-scrollbar-thumb {
    background-color: #ffb6c1;
    border-radius: 10px;
}

.cal-event {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    background: #fff0f5;
    border-radius: 8px;
    padding: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    min-width: 0;
    flex-shrink: 0;
}

.cal-event.not-started {
    background: #ffffff;
    border: 1px solid #ff69b4;
}

.cal-event.started {
    background: #e6f7ff;
    border: 1px solid #1890ff;
}

.cal-event.ending-soon {
    background: linear-gradient(135deg, #fff0eb, #ffffff);
    border: 2px solid #ff4500;
    border-left: 8px solid #ff4500;
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.15);
}

.cal-event.ending-critical {
    background: #fff1f0;
    border: 2px solid #f5222d;
    border-left: 8px solid #f5222d;
    box-shadow: 0 4px 12px rgba(245, 34, 45, 0.15);
}

.cal-event.past {
    opacity: 0.6;
    filter: grayscale(100%);
}

.cal-event:hover {
    background: #ffffff;
    border-color: #ff69b4;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.15);
}

.cal-event.started:hover {
    background: #bae7ff;
    border-color: #096dd9;
    box-shadow: 0 4px 10px rgba(24, 144, 255, 0.2);
}

.cal-event.ending-soon:hover {
    background: #ffe6dd;
    border-color: #ff3300;
    box-shadow: 0 6px 16px rgba(255, 69, 0, 0.25);
    transform: translateY(-2px);
}

.cal-event.ending-critical:hover {
    background: #ffccc7;
    border-color: #cf1322;
    box-shadow: 0 6px 16px rgba(245, 34, 45, 0.25);
    transform: translateY(-2px);
}

.cal-event-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
}

.cal-event-details {
    flex-grow: 1;
    overflow: hidden;
    min-width: 0;
}

.cal-event-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.cal-event-dates {
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Admin Section Styles */
.view-toggle.admin-active {
    background: #ff1493;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.35);
}

.admin-panel {
    background: linear-gradient(135deg, #fff5f9 0%, #ffffff 100%);
    border: 2px solid #ff69b4;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 36px;
    box-shadow: 0 10px 28px rgba(255, 20, 147, 0.08);
}

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.admin-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff1493;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-badge {
    background: #ff1493;
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.admin-form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-input {
    flex: 1;
    min-width: 260px;
    padding: 12px 18px;
    border: 2px solid #ffb6c1;
    border-radius: 30px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-input:focus {
    border-color: #ff1493;
    box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.12);
}

.admin-submit-btn {
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    color: #ffffff;
    border: none;
    padding: 12px 26px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
}

.admin-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 20, 147, 0.35);
}

.admin-submit-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.admin-status {
    margin-top: 14px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    background: #fff0f5;
    color: #c41d7f;
    border: 1px solid #ffadd2;
}

.card-footer {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.card-delete-btn {
    background: #fff1f0;
    color: #cf1322;
    border: 1px solid #ffa39e;
    padding: 7px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-delete-btn:hover {
    background: #cf1322;
    color: #ffffff;
    border-color: #cf1322;
}
