:root {
    --primary-color: #C8102E; /* Pomperaug Red */
    --light-bg: #FFFFFF; /* White */
    --dark-bg: #000000; /* Black */
    --light-text: #FFFFFF; /* White */
    --dark-text: #000000; /* Black */
    --grey-color: #5A6267; /* Pomperaug Grey */
}

.theme-light {
    --bg-color: var(--light-bg);
    --text-color: var(--dark-text);
    --card-bg: #f5f5f5; /* A very light grey for contrast */
    --border-color: var(--grey-color);
}

.theme-dark {
    --bg-color: var(--dark-bg);
    --text-color: var(--light-text);
    --card-bg: var(--grey-color);
    --border-color: #8D9397; /* A lighter grey for visibility on cards */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.badge {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.badge:hover {
    transform: scale(1.05);
}

.badge.locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge.locked::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* iOS-inspired design elements */
.ios-button {
    padding: 10px 20px;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ios-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(200, 16, 46, 0.3); /* Updated shadow color */
}

.ios-button:active {
    transform: translateY(0);
}

.ios-card {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ios-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.ios-input {
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    transition: all 0.2s ease;
}

.ios-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.3); /* Updated shadow color */
    outline: none;
}

.menu-item {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.menu-item.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* Navigation styles */
.nav-link {
    transition: all 0.2s ease;
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Form field styles */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Notification styles */
.notification {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

.notification-success {
    background-color: #10B981;
    color: white;
}

.notification-error {
    background-color: #EF4444;
    color: white;
}

.notification-warning {
    background-color: #F59E0B;
    color: white;
}

.notification-info {
    background-color: #3B82F6;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Calendar styles */
.calendar-day {
    min-height: 100px;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.5rem;
}

.calendar-day.today {
    background-color: rgba(200, 16, 46, 0.1); /* Updated highlight color */
    border-color: var(--primary-color);
}

.calendar-event {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* More visible badge */
#notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    height: 18px;
    width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color); /* Updated to brand red */
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 9999px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dark #notification-badge {
    border-color: var(--dark-bg); /* Updated to match new dark bg */
}



/* New: Pulsing animation for notification badge */
#notification-badge.notification-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.7); /* Updated pulse color */
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 5px rgba(200, 16, 46, 0); /* Updated pulse color */
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); /* Updated pulse color */
    }
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .ios-card {
        padding: 1rem;
    }
    
    .calendar-day {
        min-height: 80px;
    }
}
