/**
 * Family Calendar - Bold & Vibrant Theme
 * Optimized for 24" Portrait Display with Touch Interface
 */

:root {
    /* Bold & Vibrant Color Palette */
    --fc-primary: #FF1744;
    --fc-secondary: #00E676;
    --fc-accent: #FFEA00;
    --fc-purple: #D500F9;
    --fc-cyan: #00E5FF;
    --fc-orange: #FF6D00;

    /* UI Colors */
    --fc-bg-main: #FAFAFA;
    --fc-bg-card: #FFFFFF;
    --fc-text-dark: #212121;
    --fc-text-light: #757575;
    --fc-border: #E0E0E0;
    --fc-shadow: rgba(0, 0, 0, 0.15);

    /* Touch-friendly sizing */
    --fc-touch-min: 56px;
    --fc-touch-spacing: 16px;
    --fc-border-radius: 12px;

    /* Performance: Animation timing */
    --fc-transition-fast: 0.15s;
    --fc-transition-normal: 0.3s;
    --fc-transition-slow: 0.5s;
    --fc-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --fc-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ===========================
   PERFORMANCE OPTIMIZATIONS
   =========================== */

/* Hardware acceleration for animations */
.fc-modal,
.fc-slide,
.fc-day,
.fc-btn,
.fc-shopping-item,
.fc-task-item {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Optimize font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Reduce repaints on animations */
.fc-modal-content,
.fc-slide.active {
    will-change: transform, opacity;
}

/* Optimize images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Main Wrapper */
.family-calendar-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Portrait Optimization for 24" Display (1080x1920 or 1200x1920) */
@media (orientation: portrait) and (min-height: 1800px) {
    .family-calendar-wrapper {
        padding: 30px;
        font-size: 18px;
    }

    .fc-slideshow-container {
        height: 400px;
    }

    .fc-calendar-grid {
        font-size: 20px;
    }

    .fc-day {
        min-height: 180px;
    }
}

/* ===========================
   SLIDESHOW SECTION
   =========================== */
.fc-slideshow-container {
    width: 100%;
    height: 300px;
    margin-bottom: 30px;
    border-radius: var(--fc-border-radius);
    overflow: hidden;
    box-shadow: 0 10px 40px var(--fc-shadow);
    position: relative;
}

.fc-slideshow {
    width: 100%;
    height: 100%;
    position: relative;
}

.fc-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: flex-end;
}

.fc-slide.active {
    opacity: 1;
    z-index: 1;
}

.fc-slide-caption {
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.fc-slideshow-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    z-index: 10;
}

.fc-slide-prev,
.fc-slide-next {
    background: rgba(255, 255, 255, 0.9);
    color: var(--fc-text-dark);
    border: none;
    width: var(--fc-touch-min);
    height: var(--fc-touch-min);
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--fc-shadow);
}

.fc-slide-prev:hover,
.fc-slide-next:hover,
.fc-slide-prev:active,
.fc-slide-next:active {
    background: var(--fc-primary);
    color: white;
    transform: scale(1.1);
}

.fc-slideshow-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.fc-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.fc-indicator.active {
    background: var(--fc-primary);
    transform: scale(1.2);
}

.fc-slideshow-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--fc-cyan), var(--fc-purple));
    color: white;
    font-size: 24px;
    text-align: center;
    padding: 40px;
}

/* ===========================
   CALENDAR HEADER
   =========================== */
.fc-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--fc-bg-card);
    padding: 20px 30px;
    border-radius: var(--fc-border-radius);
    margin-bottom: 20px;
    box-shadow: 0 6px 20px var(--fc-shadow);
}

.fc-current-month {
    font-size: 32px;
    font-weight: 800;
    color: var(--fc-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fc-nav-btn {
    background: linear-gradient(135deg, var(--fc-primary), var(--fc-orange));
    color: white;
    border: none;
    width: var(--fc-touch-min);
    height: var(--fc-touch-min);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.3);
}

.fc-nav-btn:hover,
.fc-nav-btn:active {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(255, 23, 68, 0.5);
}

.fc-today-btn {
    background: var(--fc-secondary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-today-btn:hover,
.fc-today-btn:active {
    background: var(--fc-accent);
    color: var(--fc-text-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.4);
}

/* ===========================
   QUICK ACTIONS
   =========================== */
.fc-quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.fc-btn {
    flex: 1;
    min-width: 150px;
    padding: 18px 24px;
    border: none;
    border-radius: var(--fc-border-radius);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--fc-transition-normal) var(--fc-ease-smooth),
                box-shadow var(--fc-transition-normal) var(--fc-ease-smooth),
                opacity var(--fc-transition-fast) ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px var(--fc-shadow);
    min-height: var(--fc-touch-min);
    position: relative;
    overflow: hidden;
}

.fc-add-task-btn {
    background: linear-gradient(135deg, var(--fc-primary), #FF4081);
    color: white;
}

.fc-add-event-btn {
    background: linear-gradient(135deg, var(--fc-accent), #FFD600);
    color: var(--fc-text-dark);
}

.fc-reminders-btn {
    background: linear-gradient(135deg, var(--fc-cyan), #18FFFF);
    color: var(--fc-text-dark);
}

.fc-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px var(--fc-shadow);
}

.fc-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--fc-shadow);
    opacity: 0.9;
}

/* Button ripple effect on click */
.fc-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width var(--fc-transition-slow) ease,
                height var(--fc-transition-slow) ease,
                opacity var(--fc-transition-slow) ease;
    opacity: 0;
    pointer-events: none;
}

.fc-btn:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

.fc-icon {
    font-size: 24px;
}

/* ===========================
   CALENDAR GRID
   =========================== */
.fc-calendar-container {
    position: relative;
    background: var(--fc-bg-card);
    border-radius: var(--fc-border-radius);
    padding: 20px;
    box-shadow: 0 10px 40px var(--fc-shadow);
}

.fc-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.fc-weekday {
    text-align: center;
    font-weight: 800;
    font-size: 18px;
    padding: 15px;
    background: linear-gradient(135deg, var(--fc-purple), var(--fc-primary));
    color: white;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fc-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.fc-day {
    background: var(--fc-bg-main);
    border: 3px solid transparent;
    border-radius: 8px;
    padding: 12px;
    min-height: 140px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fc-day:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--fc-shadow);
    border-color: var(--fc-primary);
}

.fc-day.fc-today {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.1), rgba(213, 0, 249, 0.1));
    border-color: var(--fc-primary);
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.2);
}

.fc-day.fc-other-month {
    opacity: 0.3;
    pointer-events: none;
}

.fc-day-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--fc-text-dark);
    margin-bottom: 8px;
    display: block;
}

.fc-day.fc-today .fc-day-number {
    color: var(--fc-primary);
}

.fc-day-tasks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 90px;
    overflow: hidden;
}

.fc-task-item,
.fc-event-item,
.fc-chore-item {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
}

.fc-task-item:hover,
.fc-event-item:hover,
.fc-chore-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px var(--fc-shadow);
}

.fc-task-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.fc-event-item {
    background: linear-gradient(135deg, var(--fc-accent), #FFD600);
    color: var(--fc-text-dark);
    font-weight: 700;
}

.fc-chore-item {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    font-weight: 600;
}

.fc-task-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--fc-primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 8px var(--fc-shadow);
}

.fc-more-items-badge {
    padding: 4px 8px;
    margin-top: 2px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.fc-more-items-badge:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===========================
   MODALS
   =========================== */
.fc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.fc-modal-content {
    background: var(--fc-bg-card);
    border-radius: var(--fc-border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fcModalSlideIn 0.3s ease;
}

.fc-modal-wide {
    max-width: 800px;
}

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

.fc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 3px solid var(--fc-primary);
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.1), rgba(213, 0, 249, 0.1));
}

.fc-modal-header h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: var(--fc-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-modal-close {
    background: var(--fc-primary);
    color: white;
    border: none;
    width: var(--fc-touch-min);
    height: var(--fc-touch-min);
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-modal-close:hover,
.fc-modal-close:active {
    background: var(--fc-text-dark);
    transform: rotate(90deg);
}

/* ===========================
   FORMS
   =========================== */
.fc-form {
    padding: 30px;
}

.fc-form-group {
    margin-bottom: 24px;
}

.fc-form-group label {
    display: block;
    font-weight: 700;
    font-size: 16px;
    color: var(--fc-text-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-input,
.fc-touch-input {
    width: 100%;
    padding: 16px 20px;
    border: 3px solid var(--fc-border);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--fc-bg-main);
    min-height: var(--fc-touch-min);
}

.fc-input:focus,
.fc-touch-input:focus {
    outline: none;
    border-color: var(--fc-primary);
    box-shadow: 0 0 0 4px rgba(255, 23, 68, 0.1);
    background: white;
}

/* Enhanced touch support for on-screen keyboard */
.fc-input,
.fc-touch-input,
input,
textarea,
select {
    touch-action: manipulation;
    -webkit-user-select: text;
    user-select: text;
    -webkit-tap-highlight-color: rgba(255, 23, 68, 0.2);
}

/* Prevent zoom on input focus for better keyboard experience */
@media screen and (max-width: 1280px) {
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Active state for touch inputs */
.fc-input:active,
.fc-touch-input:active {
    border-color: var(--fc-secondary);
    transform: scale(1.01);
}

.fc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.fc-form-half {
    flex: 1;
}

/* Color Picker */
.fc-color-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.fc-color-option {
    width: 100%;
    height: var(--fc-touch-min);
    border: 4px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--fc-shadow);
}

.fc-color-option:hover,
.fc-color-option:active {
    transform: scale(1.1);
}

.fc-color-option.selected {
    border-color: var(--fc-text-dark);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Checkbox */
.fc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.fc-checkbox {
    width: 28px;
    height: 28px;
    cursor: pointer;
}

/* Form Actions */
.fc-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--fc-border);
}

.fc-btn-primary {
    background: linear-gradient(135deg, var(--fc-primary), var(--fc-orange));
    color: white;
}

.fc-btn-secondary {
    background: var(--fc-bg-main);
    color: var(--fc-text-dark);
    border: 3px solid var(--fc-border);
}

.fc-btn-secondary:hover,
.fc-btn-secondary:active {
    background: var(--fc-text-dark);
    color: white;
    border-color: var(--fc-text-dark);
}

/* ===========================
   REMINDERS LIST
   =========================== */
.fc-reminders-list {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.fc-reminder-item {
    background: var(--fc-bg-main);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 6px solid var(--fc-accent);
    box-shadow: 0 4px 12px var(--fc-shadow);
    transition: all 0.3s ease;
}

.fc-reminder-item:hover {
    transform: translateX(8px);
    box-shadow: 0 6px 20px var(--fc-shadow);
}

.fc-reminder-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--fc-primary);
    margin-bottom: 8px;
}

.fc-reminder-date {
    font-size: 16px;
    color: var(--fc-text-light);
    font-weight: 600;
}

.fc-reminder-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 8px;
}

.fc-reminder-type.birthday {
    background: var(--fc-primary);
    color: white;
}

.fc-reminder-type.anniversary {
    background: var(--fc-purple);
    color: white;
}

.fc-reminder-type.reminder {
    background: var(--fc-cyan);
    color: var(--fc-text-dark);
}

/* ===========================
   LOADING STATES
   =========================== */
.fc-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--fc-border-radius);
    z-index: 100;
}

.fc-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--fc-border);
    border-top-color: var(--fc-primary);
    border-radius: 50%;
    animation: fcSpin 0.8s linear infinite;
}

@keyframes fcSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================
   RESPONSIVE TOUCH ENHANCEMENTS
   =========================== */
@media (max-width: 1200px) {
    .fc-current-month {
        font-size: 24px;
    }

    .fc-quick-actions {
        flex-direction: column;
    }

    .fc-form-row {
        grid-template-columns: 1fr;
    }
}

/* Touch-specific enhancements */
@media (hover: none) and (pointer: coarse) {
    .fc-day {
        min-height: 160px;
    }

    .fc-btn,
    .fc-nav-btn,
    .fc-input,
    .fc-color-option {
        min-height: 60px;
    }

    .fc-task-item,
    .fc-event-item,
    .fc-chore-item {
        padding: 12px 16px;
        font-size: 16px;
        min-height: 48px;
    }
}

/* Stylus pen support - finer precision */
@media (pointer: fine) {
    .fc-day {
        min-height: 120px;
    }
}

/* ===========================
   UTILITY CLASSES
   =========================== */
.fc-color-swatch {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid white;
    box-shadow: 0 2px 4px var(--fc-shadow);
    vertical-align: middle;
    margin-right: 8px;
}

.fc-loading-text {
    text-align: center;
    color: var(--fc-text-light);
    font-size: 18px;
    padding: 40px;
}

/* Smooth scrolling */
.fc-modal-content,
.fc-reminders-list {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
.fc-modal-content::-webkit-scrollbar,
.fc-reminders-list::-webkit-scrollbar {
    width: 12px;
}

.fc-modal-content::-webkit-scrollbar-track,
.fc-reminders-list::-webkit-scrollbar-track {
    background: var(--fc-bg-main);
    border-radius: 10px;
}

.fc-modal-content::-webkit-scrollbar-thumb,
.fc-reminders-list::-webkit-scrollbar-thumb {
    background: var(--fc-primary);
    border-radius: 10px;
}

.fc-modal-content::-webkit-scrollbar-thumb:hover,
.fc-reminders-list::-webkit-scrollbar-thumb:hover {
    background: var(--fc-orange);
}

/* ===========================
   SHOPPING LIST
   =========================== */

.fc-shopping-list-btn {
    background: linear-gradient(135deg, var(--fc-secondary), #00C853);
    color: white;
}

.fc-shopping-container {
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Compact Header */
.fc-compact-header {
    padding: 12px 20px;
    min-height: auto;
}

.fc-compact-header h3 {
    font-size: 20px;
    margin: 0;
}

/* Compact Toolbar - Single Row */
.fc-compact-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--fc-bg-main);
    border-radius: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fc-toolbar-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fc-toolbar-divider {
    width: 2px;
    height: 40px;
    background: var(--fc-border);
    margin: 0 4px;
}

/* Compact Tool Buttons */
.fc-tool-btn {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    padding: 6px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fc-tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.fc-tool-btn:active {
    transform: translateY(0);
}

.fc-tool-btn.selected {
    border-color: var(--fc-primary);
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.2);
}

/* Pen color buttons */
.fc-pen-color.fc-tool-btn {
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.fc-pen-color.fc-tool-btn.selected {
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.4);
}

/* Small paper previews */
.fc-pad-preview-sm {
    display: block;
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: white;
}

.fc-pad-preview-sm.fc-pad-lines {
    background: white;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 6px, #2196F3 6px, #2196F3 7px);
}

.fc-pad-preview-sm.fc-pad-grid {
    background: white;
    background-image:
        repeating-linear-gradient(0deg, #C8E6C9 0px, transparent 1px, transparent 7px),
        repeating-linear-gradient(90deg, #C8E6C9 0px, transparent 1px, transparent 7px);
}

.fc-pad-preview-sm.fc-pad-dots {
    background: white;
    background-image: radial-gradient(circle, #FF9800 1px, transparent 1px);
    background-size: 7px 7px;
}

.fc-pad-preview-sm.fc-pad-graph {
    background: white;
    background-image:
        repeating-linear-gradient(0deg, #E1BEE7 0px, transparent 1px, transparent 7px),
        repeating-linear-gradient(90deg, #E1BEE7 0px, transparent 1px, transparent 7px);
}

/* OLD STYLES - Keep for backwards compatibility but override with compact */
.fc-drawing-tools {
    display: none; /* Hidden - using compact toolbar now */
}

.fc-tool-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fc-tool-group label {
    font-weight: 700;
    font-size: 16px;
    color: var(--fc-text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-pen-colors,
.fc-line-widths {
    display: flex;
    gap: 8px;
}

.fc-pen-color {
    width: var(--fc-touch-min);
    height: var(--fc-touch-min);
    border: 4px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--fc-shadow);
}

.fc-pen-color:hover,
.fc-pen-color:active {
    transform: scale(1.1);
}

.fc-pen-color.selected {
    border-color: var(--fc-primary);
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.2);
    transform: scale(1.15);
}

.fc-line-width {
    min-width: var(--fc-touch-min);
    height: var(--fc-touch-min);
    padding: 0 16px;
    background: white;
    border: 3px solid var(--fc-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-line-width:hover,
.fc-line-width:active {
    background: var(--fc-bg-main);
}

.fc-line-width.selected {
    background: var(--fc-primary);
    color: white;
    border-color: var(--fc-primary);
}

.fc-tool-actions {
    margin-left: auto;
}

.fc-eraser-btn,
.fc-clear-canvas-btn {
    min-width: 140px;
}

.fc-eraser-btn.active {
    background: var(--fc-orange);
    color: white;
    border-color: var(--fc-orange);
}

/* ===========================
   TEXT INPUT MODE
   =========================== */

.fc-text-input-section {
    margin-bottom: 15px;
}

.fc-input-mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.fc-mode-tab {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-mode-tab:hover {
    background: #e8e8e8;
    border-color: var(--fc-primary);
}

.fc-mode-tab.active {
    background: var(--fc-primary);
    color: white;
    border-color: var(--fc-primary);
    box-shadow: 0 4px 8px rgba(255, 23, 68, 0.3);
}

.fc-text-input-area {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 3px solid #ddd;
    border-radius: 15px;
    padding: 25px;
    max-height: 700px;
    overflow-y: auto;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

/* When in draw mode, hide text input */
.fc-shopping-container[data-mode="draw"] .fc-text-input-area {
    display: none !important;
}

/* Hide canvas and toolbar when in text mode */
.fc-shopping-container[data-mode="text"] .fc-canvas-wrapper,
.fc-shopping-container[data-mode="text"] .fc-compact-toolbar {
    display: none !important;
}

.fc-add-item-form {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: stretch;
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #e8e8e8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#fc-section-select {
    flex: 0 0 auto;
    min-width: 140px;
    max-width: 140px;
    padding: 15px 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background: white;
    border: 3px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    min-height: 60px;
    line-height: 1.4;
}

#fc-section-select:focus {
    border-color: var(--fc-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 23, 68, 0.15);
    background: #fff;
}

#fc-shopping-item-input {
    flex: 1;
    padding: 18px 20px;
    font-size: 22px;
    font-weight: 500;
    color: #000 !important;
    background: white !important;
    border: 3px solid #ddd;
    border-radius: 10px;
    min-height: 60px;
    line-height: 1.5;
    min-width: 0;
}

#fc-shopping-item-input::placeholder {
    color: #999 !important;
    opacity: 1;
}

#fc-shopping-item-input:focus {
    border-color: var(--fc-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 23, 68, 0.15);
    background: white !important;
    color: #000 !important;
}

#fc-add-item-btn {
    padding: 15px 35px;
    font-size: 20px;
    font-weight: 700;
    min-height: 60px;
    white-space: nowrap;
    background: var(--fc-primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.3);
}

#fc-add-item-btn:hover {
    background: #e91e63;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 23, 68, 0.4);
}

#fc-add-item-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 23, 68, 0.3);
}

.fc-shopping-sections {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Responsive: 3 columns on medium screens */
@media (max-width: 1400px) {
    .fc-shopping-sections {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive: 2 columns on tablets */
@media (max-width: 1024px) {
    .fc-shopping-sections {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: 1 column on mobile */
@media (max-width: 768px) {
    .fc-shopping-sections {
        grid-template-columns: 1fr;
    }

    .fc-section-items,
    .fc-shopping-items-list {
        grid-template-columns: 1fr;
    }
}

.fc-section {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.fc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--fc-primary) 0%, #ff5252 100%);
    color: white;
}

.fc-section-title {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fc-section-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

.fc-section-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px;
}

.fc-shopping-items-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.fc-shopping-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.2s ease;
    min-height: 56px;
}

.fc-shopping-item:hover {
    border-color: var(--fc-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fc-shopping-item.checked {
    opacity: 0.6;
    background: #f5f5f5;
}

.fc-shopping-item.checked .fc-item-text {
    text-decoration: line-through;
    color: #999;
}

.fc-checkbox-container {
    position: relative;
    padding-left: 40px;
    cursor: pointer;
    user-select: none;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.fc-checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.fc-checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    width: 32px;
    background-color: white;
    border: 3px solid #ddd;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.fc-checkbox-container:hover .fc-checkmark {
    border-color: var(--fc-primary);
}

.fc-checkbox-container input:checked ~ .fc-checkmark {
    background-color: var(--fc-primary);
    border-color: var(--fc-primary);
}

.fc-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.fc-checkbox-container input:checked ~ .fc-checkmark:after {
    display: block;
}

.fc-checkbox-container .fc-checkmark:after {
    left: 10px;
    top: 5px;
    width: 8px;
    height: 14px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.fc-item-text {
    flex: 1;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    word-break: break-word;
}

.fc-delete-item {
    min-width: 44px;
    min-height: 44px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.fc-delete-item:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

.fc-empty-list {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
    font-style: italic;
}

/* Canvas Wrapper - Maximized for more writing space */
.fc-canvas-wrapper {
    position: relative;
    background: white;
    border: 3px solid var(--fc-border);
    border-radius: 8px;
    overflow: auto;
    box-shadow: 0 4px 12px var(--fc-shadow);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 800px;
    max-height: 1600px;
}

#fc-shopping-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
    touch-action: none;
    background: transparent;
    /* Improved rendering for stylus/pen input */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Prevent user selection while drawing */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Disable default touch behaviors */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

#fc-shopping-canvas:active {
    cursor: crosshair;
}

/* Canvas instructions removed to maximize writing space */

/* Canvas touch optimization */
@media (hover: none) and (pointer: coarse) {
    .fc-pen-color,
    .fc-line-width,
    .fc-eraser-btn,
    .fc-clear-canvas-btn {
        min-height: 60px;
    }

    .fc-drawing-tools {
        padding: 25px;
    }

    .fc-tool-group label {
        font-size: 18px;
    }
}

/* Canvas for stylus - finer control */
@media (pointer: fine) {
    #fc-shopping-canvas {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><circle cx="8" cy="8" r="2" fill="%23FF1744"/></svg>') 8 8, crosshair;
    }
}

/* ===========================
   PAD STYLE SELECTOR
   =========================== */

.fc-pad-styles {
    display: flex;
    gap: 8px;
}

.fc-pad-style {
    width: var(--fc-touch-min);
    height: var(--fc-touch-min);
    padding: 4px;
    background: white;
    border: 3px solid var(--fc-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-pad-style:hover,
.fc-pad-style:active {
    transform: scale(1.1);
    border-color: var(--fc-secondary);
}

.fc-pad-style.selected {
    border-color: var(--fc-primary);
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.2);
    transform: scale(1.1);
}

.fc-pad-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: white;
}

/* Preview patterns */
.fc-pad-plain {
    background: white;
}

.fc-pad-lines {
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 24px,
        #2196F3 24px,
        #2196F3 25px
    );
}

.fc-pad-grid {
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 19px, #4CAF50 19px, #4CAF50 20px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, #4CAF50 19px, #4CAF50 20px);
}

.fc-pad-dots {
    background-image: radial-gradient(circle, #FF9800 1px, transparent 1px);
    background-size: 20px 20px;
}

.fc-pad-graph {
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 9px, #9C27B0 9px, #9C27B0 10px),
        repeating-linear-gradient(90deg, transparent, transparent 9px, #9C27B0 9px, #9C27B0 10px);
}

.fc-pad-columns {
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 9px, #00BCD4 9px, #00BCD4 10px),
        repeating-linear-gradient(90deg, transparent, transparent 9px, #00BCD4 9px, #00BCD4 10px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, #00BCD4 19px, #00BCD4 22px);
}

/* ===========================
   CANVAS BACKGROUND PATTERNS
   =========================== */

/* Plain - no pattern */
#fc-canvas-wrapper[data-pad-style="plain"] {
    background: white;
}

/* Horizontal Lines */
#fc-canvas-wrapper[data-pad-style="lines"] {
    background-color: white;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 29px,
        #E3F2FD 29px,
        #E3F2FD 30px,
        transparent 30px,
        transparent 59px,
        #2196F3 59px,
        #2196F3 61px
    );
}

/* Grid */
#fc-canvas-wrapper[data-pad-style="grid"] {
    background-color: white;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 29px, #C8E6C9 29px, #C8E6C9 30px),
        repeating-linear-gradient(90deg, transparent, transparent 29px, #C8E6C9 29px, #C8E6C9 30px),
        repeating-linear-gradient(0deg, transparent, transparent 59px, #4CAF50 59px, #4CAF50 61px),
        repeating-linear-gradient(90deg, transparent, transparent 59px, #4CAF50 59px, #4CAF50 61px);
}

/* Dot Grid */
#fc-canvas-wrapper[data-pad-style="dots"] {
    background-color: white;
    background-image: radial-gradient(circle, #FF9800 2px, transparent 2px);
    background-size: 30px 30px;
}

/* Graph Paper */
#fc-canvas-wrapper[data-pad-style="graph"] {
    background-color: white;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 14px, #E1BEE7 14px, #E1BEE7 15px),
        repeating-linear-gradient(90deg, transparent, transparent 14px, #E1BEE7 14px, #E1BEE7 15px),
        repeating-linear-gradient(0deg, transparent, transparent 59px, #9C27B0 59px, #9C27B0 61px),
        repeating-linear-gradient(90deg, transparent, transparent 59px, #9C27B0 59px, #9C27B0 61px);
}

/* 4-Column Paper - Perfect for shopping lists */
#fc-canvas-wrapper[data-pad-style="columns"] {
    background-color: white;
    background-image:
        /* Horizontal lines for writing */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 29px,
            #B2EBF2 29px,
            #B2EBF2 30px
        ),
        /* Vertical column dividers - 4 equal columns */
        linear-gradient(
            90deg,
            transparent 0%,
            transparent 24.5%,
            #00BCD4 24.5%,
            #00BCD4 25%,
            transparent 25%,
            transparent 49.5%,
            #00BCD4 49.5%,
            #00BCD4 50%,
            transparent 50%,
            transparent 74.5%,
            #00BCD4 74.5%,
            #00BCD4 75%,
            transparent 75%,
            transparent 100%
        );
}

/* Canvas stays on top of background */
#fc-shopping-canvas {
    position: relative;
    z-index: 2;
}

/* ===========================
   FAMILY PROFILE SELECTOR
   =========================== */

.fc-profile-selector-container {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.fc-profile-selector {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: thin;
}

.fc-profile-selector::-webkit-scrollbar {
    height: 6px;
}

.fc-profile-selector::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.fc-profile-selector::-webkit-scrollbar-thumb {
    background: var(--fc-primary);
    border-radius: 3px;
}

.fc-profile-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    flex-shrink: 0;
}

.fc-profile-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--fc-primary);
}

.fc-profile-btn.active {
    border-color: var(--fc-primary);
    background: linear-gradient(135deg, #fff0f3 0%, #ffffff 100%);
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.3);
}

.fc-profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.fc-profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.fc-profile-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.fc-profile-btn.active .fc-profile-name {
    color: var(--fc-primary);
}

/* ===========================
   FULLSCREEN PROMPT
   =========================== */

.fc-fullscreen-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: all;
}

.fc-fullscreen-prompt.visible {
    opacity: 1;
}

.fc-fullscreen-prompt-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px 60px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 600px;
    border: 3px solid var(--fc-primary);
    animation: slideUp 0.4s ease;
}

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

.fc-fullscreen-prompt-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.fc-fullscreen-prompt h3 {
    font-size: 28px;
    color: #333;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.fc-fullscreen-prompt p {
    font-size: 18px;
    color: #666;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.fc-fullscreen-prompt-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.fc-fullscreen-prompt-buttons .fc-btn {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.fc-fullscreen-prompt-buttons .fc-btn-primary {
    background: linear-gradient(135deg, var(--fc-primary) 0%, #e91e63 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
}

.fc-fullscreen-prompt-buttons .fc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 23, 68, 0.5);
}

.fc-fullscreen-prompt-buttons .fc-btn-secondary {
    background: #e0e0e0;
    color: #666;
}

.fc-fullscreen-prompt-buttons .fc-btn-secondary:hover {
    background: #d0d0d0;
}

/* ===========================
   FULLSCREEN CONTROLS
   =========================== */

.fc-view-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: auto;
}

.fc-view-style-btn,
.fc-fullscreen-btn {
    background: linear-gradient(135deg, var(--fc-purple), var(--fc-primary));
    color: white;
    border: none;
    width: var(--fc-touch-min);
    height: var(--fc-touch-min);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--fc-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-view-style-btn:hover,
.fc-fullscreen-btn:hover,
.fc-view-style-btn:active,
.fc-fullscreen-btn:active {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(213, 0, 249, 0.5);
}

/* Fullscreen icon in modals */
.fc-modal-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.fc-modal-fullscreen-btn {
    background: var(--fc-secondary);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-modal-fullscreen-btn:hover,
.fc-modal-fullscreen-btn:active {
    background: var(--fc-purple);
    transform: scale(1.1);
}

/* ===========================
   VIEW STYLE SELECTOR
   =========================== */

.fc-view-style-selector {
    background: var(--fc-bg-card);
    border-radius: var(--fc-border-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px var(--fc-shadow);
    animation: fcSlideIn 0.3s ease;
}

.fc-view-style-selector h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--fc-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-style-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.fc-style-option {
    background: var(--fc-bg-main);
    border: 4px solid transparent;
    border-radius: var(--fc-border-radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: var(--fc-touch-min);
}

.fc-style-option:hover,
.fc-style-option:active {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--fc-shadow);
}

.fc-style-option.active {
    border-color: var(--fc-primary);
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.2);
}

.fc-style-preview {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--fc-shadow);
}

.fc-style-vibrant {
    background: linear-gradient(135deg, #FF1744, #D500F9, #00E676);
}

.fc-style-minimal {
    background: linear-gradient(135deg, #ECEFF1, #B0BEC5, #78909C);
}

.fc-style-dark {
    background: linear-gradient(135deg, #263238, #37474F, #455A64);
}

.fc-style-pastel {
    background: linear-gradient(135deg, #FFB3BA, #BAFFC9, #BAE1FF);
}

.fc-style-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--fc-text-dark);
    text-align: center;
}

/* ===========================
   THEME STYLES
   =========================== */

/* Vibrant Theme (Default) - Already styled above */

/* Minimal Theme */
.fc-style-minimal {
    --fc-primary: #546E7A;
    --fc-secondary: #78909C;
    --fc-accent: #B0BEC5;
    --fc-purple: #90A4AE;
    --fc-cyan: #B0BEC5;
    --fc-orange: #78909C;
}

.fc-style-minimal .family-calendar-wrapper {
    background: linear-gradient(135deg, #ECEFF1 0%, #CFD8DC 100%);
}

.fc-style-minimal .fc-weekday {
    background: linear-gradient(135deg, #90A4AE, #78909C);
}

.fc-style-minimal .fc-btn {
    filter: saturate(0.7);
}

/* Dark Theme */
.fc-style-dark {
    --fc-primary: #BB86FC;
    --fc-secondary: #03DAC6;
    --fc-accent: #FFC107;
    --fc-purple: #BB86FC;
    --fc-cyan: #03DAC6;
    --fc-orange: #FF6E40;
    --fc-bg-main: #1E1E1E;
    --fc-bg-card: #2D2D2D;
    --fc-text-dark: #E0E0E0;
    --fc-text-light: #B0B0B0;
    --fc-border: #424242;
}

.fc-style-dark .family-calendar-wrapper {
    background: linear-gradient(135deg, #121212 0%, #1E1E1E 100%);
}

.fc-style-dark .fc-calendar-container,
.fc-style-dark .fc-calendar-header,
.fc-style-dark .fc-quick-actions,
.fc-style-dark .fc-modal-content {
    background: var(--fc-bg-card);
    color: var(--fc-text-dark);
}

.fc-style-dark .fc-day {
    background: #1E1E1E;
    color: var(--fc-text-dark);
}

.fc-style-dark .fc-day.fc-today {
    background: rgba(187, 134, 252, 0.15);
    border-color: var(--fc-primary);
}

.fc-style-dark .fc-input,
.fc-style-dark .fc-touch-input {
    background: #1E1E1E;
    color: var(--fc-text-dark);
    border-color: #424242;
}

/* Pastel Theme */
.fc-style-pastel {
    --fc-primary: #FF6B9D;
    --fc-secondary: #95E1D3;
    --fc-accent: #FFA07A;
    --fc-purple: #C7CEEA;
    --fc-cyan: #A8E6CF;
    --fc-orange: #FFD3B6;
}

.fc-style-pastel .family-calendar-wrapper {
    background: linear-gradient(135deg, #FFF5F7 0%, #FFE5EC 100%);
}

.fc-style-pastel .fc-weekday {
    background: linear-gradient(135deg, #C7CEEA, #A8E6CF);
}

.fc-style-pastel .fc-btn {
    filter: saturate(0.8) brightness(1.1);
}

/* Fullscreen mode adjustments */
:fullscreen .family-calendar-wrapper,
:-webkit-full-screen .family-calendar-wrapper,
:-moz-full-screen .family-calendar-wrapper,
:-ms-fullscreen .family-calendar-wrapper {
    padding: 40px;
    max-width: 100%;
    height: 100vh;
    overflow-y: auto;
}

:fullscreen .fc-slideshow-container,
:-webkit-full-screen .fc-slideshow-container,
:-moz-full-screen .fc-slideshow-container,
:-ms-fullscreen .fc-slideshow-container {
    height: 400px;
}

/* Exit fullscreen button highlight in fullscreen mode */
:fullscreen .fc-fullscreen-btn,
:-webkit-full-screen .fc-fullscreen-btn,
:-moz-full-screen .fc-fullscreen-btn,
:-ms-fullscreen .fc-fullscreen-btn {
    animation: fcPulse 2s infinite;
}

@keyframes fcPulse {
    0%, 100% {
        box-shadow: 0 4px 12px var(--fc-shadow);
    }
    50% {
        box-shadow: 0 6px 20px rgba(213, 0, 249, 0.8);
    }
}

/* Modal fullscreen mode */
.fc-modal:fullscreen,
.fc-modal:-webkit-full-screen,
.fc-modal:-moz-full-screen,
.fc-modal:-ms-fullscreen {
    padding: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-modal:fullscreen .fc-modal-content,
.fc-modal:-webkit-full-screen .fc-modal-content,
.fc-modal:-moz-full-screen .fc-modal-content,
.fc-modal:-ms-fullscreen .fc-modal-content {
    max-width: 95vw;
    max-height: 95vh;
    width: 95vw;
    height: 95vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.fc-modal:fullscreen .fc-shopping-container,
.fc-modal:-webkit-full-screen .fc-shopping-container,
.fc-modal:-moz-full-screen .fc-shopping-container,
.fc-modal:-ms-fullscreen .fc-shopping-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fc-modal:fullscreen .fc-canvas-wrapper,
.fc-modal:-webkit-full-screen .fc-canvas-wrapper,
.fc-modal:-moz-full-screen .fc-canvas-wrapper,
.fc-modal:-ms-fullscreen .fc-canvas-wrapper {
    flex: 1;
    height: auto;
    max-height: calc(100% - 80px);
}

.fc-modal:fullscreen #fc-shopping-canvas,
.fc-modal:-webkit-full-screen #fc-shopping-canvas,
.fc-modal:-moz-full-screen #fc-shopping-canvas,
.fc-modal:-ms-fullscreen #fc-shopping-canvas {
    width: 100%;
    height: 100%;
    max-height: 100%;
}

/* Fullscreen button pulses in modal fullscreen too */
.fc-modal:fullscreen .fc-modal-fullscreen-btn,
.fc-modal:-webkit-full-screen .fc-modal-fullscreen-btn,
.fc-modal:-moz-full-screen .fc-modal-fullscreen-btn,
.fc-modal:-ms-fullscreen .fc-modal-fullscreen-btn {
    animation: fcPulse 2s infinite;
}

/* ===========================
   LANDSCAPE MODE OPTIMIZATION FOR 24" TOUCHSCREEN MONITOR
   Target: 1920x1080 or 1920x1200 Landscape Displays
   =========================== */

@media (orientation: landscape) and (min-width: 1800px) {
    /* Main wrapper adjustments - Side-by-side layout */
    .family-calendar-wrapper {
        padding: 20px;
        font-size: 16px;
        display: flex;
        gap: 20px;
        align-items: flex-start;
        min-height: 100vh;
    }

    /* Slideshow - Left sidebar with full height */
    .fc-slideshow-container {
        width: 400px;
        min-width: 400px;
        height: calc(100vh - 40px);
        margin-bottom: 0;
        flex-shrink: 0;
    }

    /* Main content area takes remaining space */
    .fc-main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
        overflow: visible;
    }

    /* Calendar Header - compact horizontal layout */
    .fc-calendar-header {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 15px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .fc-current-month {
        font-size: 24px;
        margin: 0;
        font-weight: 700;
    }

    .fc-nav-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .fc-today-btn {
        min-height: 44px;
    }

    .fc-view-controls {
        margin-left: auto;
        display: flex;
        gap: 8px;
    }

    /* Quick actions - more compact */
    .fc-quick-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 15px;
    }

    .fc-quick-actions .fc-btn {
        flex: 1;
        min-width: 140px;
        padding: 10px 16px;
        font-size: 14px;
    }

    /* Calendar container */
    .fc-calendar-container {
        flex: 1;
        min-height: 0;
        overflow: visible;
    }

    /* Calendar Grid - compact for landscape, fits without scrolling */
    .fc-calendar-grid {
        font-size: 13px;
        gap: 8px;
    }

    .fc-day {
        min-height: 90px;
        padding: 6px;
    }

    .fc-day-number {
        font-size: 16px;
        margin-bottom: 3px;
    }

    .fc-task-item {
        font-size: 11px;
        padding: 3px 6px;
        margin-bottom: 3px;
    }

    /* Modals - wider for landscape */
    .fc-modal-content {
        width: 90%;
        max-width: 1600px;
        max-height: 90vh;
    }

    /* Shopping List Modal - optimized for landscape */
    #fc-shopping-modal .fc-modal-content {
        width: 95%;
        max-width: 1800px;
    }

    /* Canvas wrapper scales better in landscape */
    .fc-canvas-wrapper {
        max-width: 100%;
        flex: 1;
    }

    #fc-shopping-canvas {
        max-width: 100%;
        height: auto;
    }

    /* Compact toolbar in landscape - optimize for horizontal space */
    .fc-compact-toolbar {
        padding: 8px;
        margin-bottom: 8px;
        gap: 6px;
    }

    .fc-toolbar-divider {
        height: 36px;
    }

    .fc-tool-btn {
        min-width: 38px;
        min-height: 38px;
        width: 38px;
        height: 38px;
    }

    /* Color palette - single row */
    .fc-color-palette {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Touch targets remain large enough */
    .fc-color-option,
    .fc-width-option,
    .fc-pad-style {
        min-width: 50px;
        min-height: 50px;
    }

    /* Action buttons */
    .fc-form-actions {
        display: flex;
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* View style selector - horizontal */
    .fc-view-styles {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Compact spacing for landscape */
    .fc-section {
        margin-bottom: 20px;
    }

    /* Month navigation */
    .fc-month-nav {
        gap: 16px;
    }

    .fc-month-nav button {
        padding: 10px 20px;
        font-size: 16px;
    }

    /* Reminders and events lists */
    .fc-reminder-item,
    .fc-event-item {
        padding: 12px;
        font-size: 14px;
    }

    /* Form inputs */
    .fc-form-group input,
    .fc-form-group select,
    .fc-form-group textarea {
        font-size: 15px;
        padding: 10px;
    }

    /* Buttons maintain touch-friendly size */
    .fc-btn {
        min-height: 50px;
        padding: 12px 24px;
        font-size: 15px;
    }

    /* Shopping container in modal */
    .fc-shopping-container {
        display: flex;
        flex-direction: column;
        max-height: calc(90vh - 100px);
        padding: 12px;
    }
}

/* Extra wide landscape displays (2560x1440 or larger) */
@media (orientation: landscape) and (min-width: 2400px) {
    .family-calendar-wrapper {
        padding: 30px;
        font-size: 18px;
        gap: 30px;
    }

    /* Wider slideshow for large displays */
    .fc-slideshow-container {
        width: 500px;
        min-width: 500px;
        height: calc(100vh - 60px);
    }

    .fc-current-month {
        font-size: 28px;
    }

    .fc-calendar-grid {
        font-size: 15px;
        gap: 10px;
    }

    .fc-day {
        min-height: 110px;
        padding: 10px;
    }

    .fc-day-number {
        font-size: 18px;
    }

    .fc-task-item {
        font-size: 13px;
        padding: 4px 8px;
    }

    .fc-modal-content {
        max-width: 2000px;
    }

    #fc-shopping-modal .fc-modal-content {
        max-width: 2200px;
    }

    .fc-btn {
        font-size: 16px;
        padding: 14px 28px;
    }
}

/* ===========================
   FINAL ENHANCEMENTS & POLISH
   =========================== */

/* Required field indicator */
label[for*="-title"]:after,
label[for*="-date"]:after,
label[for*="-type"]:after {
    content: " *";
    color: var(--fc-primary);
    font-weight: 700;
}

/* Input validation states */
input.fc-input.error,
textarea.fc-input.error,
select.fc-input.error {
    border-color: #F44336 !important;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1) !important;
    animation: shake 0.3s;
}

input.fc-input.success,
textarea.fc-input.success,
select.fc-input.success {
    border-color: #4CAF50 !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1) !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Success animation for saves */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fc-btn-primary:active {
    animation: successPulse 0.3s ease;
}

/* Better notification styles */
.fc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
    min-width: 300px;
    max-width: 500px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.fc-notification.success {
    background: linear-gradient(135deg, #4CAF50, #45A049);
    color: white;
}

.fc-notification.error {
    background: linear-gradient(135deg, #F44336, #E53935);
    color: white;
}

.fc-notification.warning {
    background: linear-gradient(135deg, #FF9800, #FB8C00);
    color: white;
}

/* Empty state styling */
.fc-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--fc-text-light);
}

.fc-empty-state-icon {
    font-size: 64px;
    opacity: 0.3;
    margin-bottom: 20px;
}

.fc-empty-state-text {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--fc-text-dark);
}

.fc-empty-state-subtext {
    font-size: 14px;
    color: var(--fc-text-light);
}

/* Loading pulse animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.fc-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Hover effects on interactive elements */
.fc-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.fc-task-item:hover,
.fc-event-item:hover,
.fc-chore-item:hover,
.fc-reminder-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Better button hover states */
.fc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.fc-btn:active {
    transform: translateY(0);
}

/* Smooth transitions everywhere */
* {
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

/* Accessibility improvements */
.fc-btn:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--fc-accent);
    outline-offset: 2px;
}

/* Keyboard navigation hint */
.fc-keyboard-hint {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fc-keyboard-hint.visible {
    opacity: 1;
}

/* Print styles */
@media print {
    .fc-btn,
    .fc-modal,
    .fc-notification,
    .fc-loading,
    .fc-slideshow-controls,
    .fc-quick-actions {
        display: none !important;
    }

    .family-calendar-wrapper {
        background: white !important;
    }

    .fc-day {
        page-break-inside: avoid;
    }
}

/* Touch feedback */
@media (hover: none) and (pointer: coarse) {
    .fc-btn:active,
    .fc-day:active,
    .fc-task-item:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* Confirmation dialog styles */
.fc-confirm-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    min-width: 400px;
    max-width: 500px;
}

.fc-confirm-dialog h3 {
    margin: 0 0 15px;
    font-size: 22px;
    color: var(--fc-text-dark);
}

.fc-confirm-dialog p {
    margin: 0 0 25px;
    color: var(--fc-text-light);
    font-size: 16px;
    line-height: 1.5;
}

.fc-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Overlay for confirmation dialog */
.fc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    backdrop-filter: blur(4px);
}

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(45deg);
        opacity: 1;
    }
}

.fc-success-checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-right: 3px solid white;
    border-bottom: 3px solid white;
    transform: rotate(45deg);
    animation: checkmark 0.5s ease;
    margin-right: 10px;
}

/* Keyboard shortcuts help tooltip */
.fc-keyboard-shortcuts {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 9998;
    min-width: 300px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.fc-keyboard-shortcuts h4 {
    margin: 0 0 15px;
    font-size: 16px;
    color: var(--fc-accent);
}

.fc-keyboard-shortcuts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fc-keyboard-shortcuts li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fc-keyboard-shortcuts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.fc-keyboard-shortcuts kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    font-weight: bold;
}

/* Smooth fade-in animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fc-task-item,
.fc-event-item {
    animation: fadeIn 0.3s ease;
}

/* Loading spinner */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fc-loading-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--fc-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

/* Ripple effect on button clicks (touch feedback) */
.fc-btn {
    position: relative;
    overflow: hidden;
}

.fc-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.fc-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Gradient animation on hover for primary buttons */
.fc-btn-primary {
    background: linear-gradient(135deg, var(--fc-primary), #FF4757);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Improved scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--fc-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF4757;
}

/* Skeleton loading states */
.fc-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===========================
   ENHANCED TOUCH INPUT STYLES
   =========================== */

/* Make inputs more visible and touch-friendly */
.fc-input,
input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="email"],
textarea,
select {
    min-height: 48px !important;
    font-size: 18px !important;
    padding: 12px 16px !important;
    border: 3px solid #ddd !important;
    border-radius: 8px !important;
    background: white !important;
    transition: all 0.3s ease !important;
}

/* Active/Focus state for touch inputs */
.fc-input:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--fc-primary) !important;
    background: #fffef5 !important;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1) !important;
    outline: none !important;
    transform: scale(1.02);
}

/* Touch feedback */
.fc-input:active,
input:active,
textarea:active {
    background: #fff9e6 !important;
    transform: scale(0.99);
}

/* Larger touch targets for buttons */
.fc-btn {
    min-height: 52px !important;
    min-width: 120px !important;
    font-size: 18px !important;
    padding: 14px 28px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
}

/* Extra large touch target for primary buttons */
.fc-btn-primary {
    min-height: 56px !important;
    font-size: 20px !important;
}

/* Visual indicator for active input */
@keyframes inputPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1); }
    50% { box-shadow: 0 0 0 6px rgba(255, 107, 107, 0.2); }
}

.fc-input:focus,
input:focus,
textarea:focus {
    animation: inputPulse 2s infinite;
}

/* Touch keyboard hint */
.fc-keyboard-hint-persistent {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fc-keyboard-hint-persistent.show {
    opacity: 1;
}

/* Make date/time pickers more visible */
input[type="date"],
input[type="time"] {
    position: relative;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Textarea specific */
textarea {
    min-height: 120px !important;
    resize: vertical;
    line-height: 1.6;
}

/* Select dropdown */
select {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%207l5%205%205-5z%22%20fill%3D%22%23333%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 45px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Touchscreen-specific select improvements */
@media (hover: none) and (pointer: coarse) {
    select {
        /* Restore native appearance on touch devices for better UX */
        -webkit-appearance: menulist !important;
        -moz-appearance: menulist !important;
        appearance: menulist !important;
        background-image: none !important;
        padding-right: 16px !important;
    }
}

/* Ensure select options are visible and touchable */
select option {
    padding: 12px !important;
    font-size: 16px !important;
    min-height: 44px !important;
}

/* Labels more visible */
label {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

/* Modal form improvements */
.fc-modal-content {
    padding: 30px !important;
}

.fc-form-row {
    margin-bottom: 24px !important;
}

/* Checkbox and radio buttons larger */
input[type="checkbox"],
input[type="radio"] {
    width: 28px !important;
    height: 28px !important;
    cursor: pointer;
    margin-right: 12px;
}

/* Loading overlay more visible */
.fc-loading {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95) !important;
}

.fc-loading-spinner {
    width: 60px !important;
    height: 60px !important;
    border-width: 5px !important;
}

/* Notification larger for touch */
.fc-notification {
    font-size: 18px !important;
    padding: 20px 30px !important;
    min-width: 350px !important;
}

/* Touch ripple effect */
@keyframes touchRipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.fc-touch-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    width: 20px;
    height: 20px;
    animation: touchRipple 0.6s ease-out;
    pointer-events: none;
}

/* ===========================
   MOBILE SMARTPHONE STYLES
   =========================== */

/* Smartphones (portrait and landscape) */
@media only screen and (max-width: 768px) {

    /* Reset touch-optimized sizes for mobile */
    .fc-input,
    input[type="text"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    input[type="email"],
    textarea,
    select {
        min-height: 44px !important;
        font-size: 16px !important;
        padding: 10px 12px !important;
        border: 2px solid #ddd !important;
    }

    .fc-btn {
        min-height: 44px !important;
        min-width: 100px !important;
        font-size: 16px !important;
        padding: 10px 20px !important;
    }

    label {
        font-size: 14px !important;
    }

    /* Container adjustments */
    .family-calendar-wrapper {
        display: block !important;
        padding: 10px !important;
        max-width: 100% !important;
    }

    /* Stack slideshow and calendar vertically */
    .fc-main-content {
        width: 100% !important;
        max-width: 100% !important;
    }

    .fc-slideshow-container {
        width: 100% !important;
        height: 200px !important;
        min-width: 100% !important;
        margin-bottom: 15px !important;
    }

    .fc-slideshow-image {
        max-height: 200px !important;
        object-fit: cover !important;
    }

    /* Calendar header */
    .fc-calendar-header {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 15px 10px !important;
    }

    .fc-month-nav {
        width: 100% !important;
        justify-content: center !important;
    }

    .fc-month-nav button {
        font-size: 18px !important;
        width: 40px !important;
        height: 40px !important;
    }

    .fc-current-month {
        font-size: 20px !important;
        text-align: center !important;
    }

    /* Quick actions - horizontal scroll */
    .fc-quick-actions {
        display: flex !important;
        gap: 8px !important;
        padding: 10px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex-wrap: nowrap !important;
    }

    .fc-quick-actions .fc-btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        font-size: 14px !important;
        padding: 8px 16px !important;
        min-width: auto !important;
    }

    /* Calendar grid - compact for mobile */
    .fc-calendar-days {
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 2px !important;
        padding: 5px !important;
    }

    .fc-weekdays {
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 2px !important;
        padding: 5px !important;
    }

    .fc-weekday {
        font-size: 11px !important;
        padding: 5px 2px !important;
    }

    .fc-day {
        min-height: 50px !important;
        padding: 4px !important;
        border-radius: 4px !important;
    }

    .fc-day-number {
        font-size: 14px !important;
        padding: 2px !important;
    }

    .fc-day-tasks {
        display: none !important; /* Hide tasks in grid view on mobile */
    }

    .fc-task-badge {
        width: 18px !important;
        height: 18px !important;
        font-size: 10px !important;
        top: 2px !important;
        right: 2px !important;
    }

    /* Modals - fullscreen on mobile */
    .fc-modal {
        padding: 0 !important;
        align-items: flex-start !important;
    }

    .fc-modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
        padding: 15px !important;
    }

    .fc-modal-header {
        padding: 15px !important;
        position: sticky !important;
        top: 0 !important;
        background: white !important;
        z-index: 10 !important;
        margin: -15px -15px 15px -15px !important;
        border-bottom: 2px solid #eee !important;
    }

    .fc-modal-title {
        font-size: 20px !important;
    }

    .fc-modal-close {
        width: 35px !important;
        height: 35px !important;
        font-size: 24px !important;
    }

    /* Form adjustments */
    .fc-form-row {
        margin-bottom: 15px !important;
    }

    .fc-modal-footer {
        position: sticky !important;
        bottom: 0 !important;
        background: white !important;
        padding: 15px !important;
        margin: 15px -15px -15px -15px !important;
        border-top: 2px solid #eee !important;
        display: flex !important;
        gap: 10px !important;
    }

    .fc-modal-footer .fc-btn {
        flex: 1 !important;
    }

    /* Shopping list - fullscreen on mobile */
    #fc-shopping-canvas {
        width: 100% !important;
        max-width: 100% !important;
        height: calc(100vh - 250px) !important;
    }

    .fc-compact-toolbar {
        flex-wrap: wrap !important;
        padding: 8px !important;
        gap: 6px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .fc-tool-btn {
        min-width: 35px !important;
        min-height: 35px !important;
        width: 35px !important;
        height: 35px !important;
        padding: 4px !important;
        font-size: 16px !important;
    }

    .fc-toolbar-divider {
        display: none !important; /* Hide dividers on mobile */
    }

    /* Reminders list */
    .fc-reminder-item {
        padding: 12px !important;
        margin-bottom: 10px !important;
        font-size: 14px !important;
    }

    .fc-reminder-title {
        font-size: 15px !important;
    }

    .fc-reminder-date {
        font-size: 13px !important;
    }

    /* Day details modal */
    .fc-day-details-content {
        padding: 0 !important;
    }

    .fc-day-details-content h4 {
        font-size: 18px !important;
        margin: 15px 0 10px !important;
    }

    /* Notifications - position at top on mobile */
    .fc-notification {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        font-size: 15px !important;
        padding: 15px 20px !important;
        min-width: auto !important;
        max-width: calc(100% - 20px) !important;
    }

    /* Loading overlay */
    .fc-loading-spinner {
        width: 50px !important;
        height: 50px !important;
        border-width: 4px !important;
    }

    /* View style selector */
    .fc-view-style-selector {
        right: 10px !important;
        top: 60px !important;
    }

    .fc-style-option {
        padding: 10px 15px !important;
        font-size: 14px !important;
    }

    /* Color options */
    .fc-color-options {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
    }

    .fc-color-option {
        width: 40px !important;
        height: 40px !important;
    }

    /* Empty states */
    .fc-empty-state {
        padding: 40px 15px !important;
    }

    .fc-empty-state-icon {
        font-size: 48px !important;
    }

    .fc-empty-state-text {
        font-size: 16px !important;
    }

    .fc-empty-state-subtext {
        font-size: 13px !important;
    }

    /* Keyboard shortcuts - hide on mobile */
    .fc-keyboard-shortcuts {
        display: none !important;
    }

    /* Hide slideshow controls on very small screens */
    .fc-slideshow-controls {
        bottom: 5px !important;
    }

    .fc-slideshow-controls button {
        width: 30px !important;
        height: 30px !important;
        font-size: 14px !important;
    }
}

/* Extra small phones (portrait) */
@media only screen and (max-width: 375px) {
    .fc-day {
        min-height: 45px !important;
        padding: 3px !important;
    }

    .fc-day-number {
        font-size: 12px !important;
    }

    .fc-weekday {
        font-size: 10px !important;
    }

    .fc-current-month {
        font-size: 18px !important;
    }

    .fc-quick-actions .fc-btn {
        font-size: 13px !important;
        padding: 6px 12px !important;
    }

    .fc-tool-btn {
        min-width: 32px !important;
        min-height: 32px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }
}

/* Tablet portrait */
@media only screen and (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    .family-calendar-wrapper {
        display: block !important;
        padding: 15px !important;
    }

    .fc-slideshow-container {
        width: 100% !important;
        height: 300px !important;
        margin-bottom: 20px !important;
    }

    .fc-calendar-days {
        gap: 4px !important;
    }

    .fc-day {
        min-height: 70px !important;
    }

    .fc-day-number {
        font-size: 16px !important;
    }
}

/* Landscape mode on phones */
@media only screen and (max-width: 768px) and (orientation: landscape) {
    .fc-slideshow-container {
        display: none !important; /* Hide slideshow in landscape to save space */
    }

    .fc-calendar-header {
        flex-direction: row !important;
        padding: 10px !important;
    }

    .fc-day {
        min-height: 40px !important;
    }

    #fc-shopping-canvas {
        height: calc(100vh - 200px) !important;
    }
}

/* ===========================
   CONFETTI ANIMATIONS
   =========================== */
.fc-confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.fc-confetti-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0.9;
    pointer-events: none;
}

@keyframes fc-confetti-fall {
    from {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: translateY(var(--end-y)) translateX(calc(var(--end-x) - 50vw)) rotate(var(--rotation));
        opacity: 0;
    }
}

/* ===========================
   FAMILY QUOTES WIDGET
   =========================== */
.fc-quote-widget {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
    border-left: 5px solid var(--fc-primary);
    padding: 20px 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--fc-shadow);
    animation: fc-quote-fade-in 1s ease-out;
}

.fc-quote-text {
    font-size: 18px;
    font-style: italic;
    color: var(--fc-text-dark);
    margin-bottom: 10px;
    line-height: 1.6;
}

.fc-quote-author {
    font-size: 14px;
    color: var(--fc-text-light);
    font-weight: 600;
    text-align: right;
}

@keyframes fc-quote-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   WEATHER WIDGET
   =========================== */
.fc-weather-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-weather-loading {
    font-size: 16px;
    opacity: 0.9;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.fc-weather-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.fc-weather-icon {
    font-size: 64px;
    line-height: 1;
}

.fc-weather-icon .weather-emoji {
    display: inline-block;
    font-size: 64px;
    line-height: 1;
}

.fc-weather-info {
    text-align: left;
}

.fc-weather-temp {
    font-size: 42px;
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

.fc-weather-desc {
    font-size: 16px;
    margin: 5px 0;
    opacity: 0.95;
    text-transform: capitalize;
}

.fc-weather-location {
    font-size: 14px;
    font-weight: 600;
    margin: 5px 0 0 0;
    opacity: 0.85;
}

.fc-weather-error {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.fc-weather-error-text {
    display: block;
    padding: 5px 0;
}

/* Responsive adjustments for weather widget */
@media (max-width: 768px) {
    .fc-weather-widget {
        padding: 15px;
        min-height: 100px;
    }

    .fc-weather-icon,
    .fc-weather-icon .weather-emoji {
        font-size: 48px;
    }

    .fc-weather-temp {
        font-size: 32px;
    }

    .fc-weather-desc {
        font-size: 14px;
    }

    .fc-weather-location {
        font-size: 12px;
    }
}

/* ===========================
   BIRTHDAY COUNTDOWN
   =========================== */
.fc-birthday-countdown {
    background: linear-gradient(135deg, #FF6B6B, #FFD93D);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    text-align: center;
    animation: fc-pulse 2s infinite;
}

.fc-countdown-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.fc-countdown-timer {
    font-size: 36px;
    font-weight: 800;
    margin: 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.fc-countdown-label {
    font-size: 14px;
    opacity: 0.9;
}

@keyframes fc-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    }
}

/* ===========================
   DARK MODE THEME
   =========================== */
.fc-dark-mode {
    --fc-bg-main: #1e1e2e;
    --fc-bg-calendar: #2a2a3e;
    --fc-text-dark: #e0e0e0;
    --fc-text-light: #a0a0b0;
    --fc-border: #3a3a4e;
    --fc-shadow: rgba(0, 0, 0, 0.5);
}

.fc-dark-mode .family-calendar-wrapper {
    background: var(--fc-bg-main);
}

.fc-dark-mode .fc-calendar-container {
    background: var(--fc-bg-calendar);
}

.fc-dark-mode .fc-day {
    background: #25253a;
    border-color: #3a3a4e;
}

.fc-dark-mode .fc-day:hover {
    background: #2d2d42;
}

.fc-dark-mode .fc-day.fc-today {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(213, 0, 249, 0.2));
    border-color: var(--fc-primary);
}

.fc-dark-mode .fc-modal-content {
    background: #2a2a3e;
    color: #e0e0e0;
}

.fc-dark-mode .fc-input,
.fc-dark-mode input,
.fc-dark-mode textarea,
.fc-dark-mode select {
    background: #25253a !important;
    color: #e0e0e0 !important;
    border-color: #3a3a4e !important;
}

.fc-dark-mode label {
    color: #e0e0e0 !important;
}

/* ===========================
   THEME PRESETS
   =========================== */

/* Pastel Theme */
.fc-theme-pastel {
    --fc-primary: #FFB3BA;
    --fc-accent: #BAFFC9;
    --fc-purple: #E0BBE4;
    --fc-cyan: #AED9E0;
}

/* Nature Theme */
.fc-theme-nature {
    --fc-primary: #6BCF7F;
    --fc-accent: #95E1D3;
    --fc-purple: #AA96DA;
    --fc-cyan: #FCBAD3;
}

/* Ocean Theme */
.fc-theme-ocean {
    --fc-primary: #4A90E2;
    --fc-accent: #50C9CE;
    --fc-purple: #7B68EE;
    --fc-cyan: #87CEEB;
}

/* Sunset Theme */
.fc-theme-sunset {
    --fc-primary: #FF6B6B;
    --fc-accent: #FFD93D;
    --fc-purple: #FF9CEE;
    --fc-cyan: #FFA07A;
}

/* ===========================
   FONT SIZE ADJUSTMENTS
   =========================== */
.fc-font-small {
    font-size: 13px;
}

.fc-font-small .fc-current-month {
    font-size: 22px;
}

.fc-font-small .fc-day-number {
    font-size: 18px;
}

.fc-font-large {
    font-size: 17px;
}

.fc-font-large .fc-current-month {
    font-size: 32px;
}

.fc-font-large .fc-day-number {
    font-size: 26px;
}

.fc-font-xlarge {
    font-size: 19px;
}

.fc-font-xlarge .fc-current-month {
    font-size: 36px;
}

.fc-font-xlarge .fc-day-number {
    font-size: 30px;
}

/* ===========================
   ANIMATION SPEED CLASSES
   =========================== */
.fc-anim-slow * {
    transition-duration: 0.6s !important;
    animation-duration: 0.6s !important;
}

.fc-anim-fast * {
    transition-duration: 0.15s !important;
    animation-duration: 0.15s !important;
}

.fc-anim-none * {
    transition: none !important;
    animation: none !important;
}

/* ===========================
   VOICE INPUT BUTTON
   =========================== */
.fc-voice-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.fc-voice-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.fc-voice-btn.listening {
    animation: fc-voice-pulse 1s infinite;
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

@keyframes fc-voice-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* ===========================
   NOTIFICATION POSITIONS
   =========================== */
.fc-notification.pos-top-left {
    top: 20px;
    left: 20px;
    right: auto;
}

.fc-notification.pos-top-right {
    top: 20px;
    right: 20px;
    left: auto;
}

.fc-notification.pos-bottom-left {
    bottom: 20px;
    top: auto;
    left: 20px;
    right: auto;
}

.fc-notification.pos-bottom-right {
    bottom: 20px;
    top: auto;
    right: 20px;
    left: auto;
}

/* ===========================
   COMPACT MODE
   =========================== */
.fc-compact-mode .fc-day {
    min-height: 100px !important;
    padding: 8px !important;
}

.fc-compact-mode .fc-day-number {
    font-size: 16px !important;
    margin-bottom: 4px !important;
}

.fc-compact-mode .fc-task-item,
.fc-compact-mode .fc-event-item {
    padding: 4px 8px !important;
    font-size: 11px !important;
}

.fc-compact-mode .fc-current-month {
    font-size: 22px !important;
}

/* ===========================
   WEEK NUMBERS
   =========================== */
.fc-week-number {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 700;
    color: var(--fc-text-light);
    opacity: 0.5;
}

.fc-calendar-days.show-week-numbers {
    padding-left: 40px;
    position: relative;
}

/* ===========================
   CELEBRATION SUCCESS ANIMATION
   =========================== */
@keyframes fc-celebrate-success {
    0% {
        transform: scale(1);
    }
    15% {
        transform: scale(1.2) rotate(5deg);
    }
    30% {
        transform: scale(1) rotate(-5deg);
    }
    45% {
        transform: scale(1.1) rotate(3deg);
    }
    60% {
        transform: scale(1) rotate(-3deg);
    }
    75% {
        transform: scale(1.05) rotate(1deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.fc-task-item.celebrating {
    animation: fc-celebrate-success 0.6s ease-out;
}

/* ===========================
   EDIT/DELETE ACTION BUTTONS
   =========================== */
.fc-item-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.fc-reminder-item:hover .fc-item-actions {
    opacity: 1;
}

.fc-btn-icon {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fc-btn-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

.fc-delete-task-btn:hover,
.fc-delete-event-btn:hover {
    background: #ff5252;
    color: white;
    border-color: #ff5252;
}

.fc-edit-task-btn:hover,
.fc-edit-event-btn:hover {
    background: #4ECDC4;
    color: white;
    border-color: #4ECDC4;
}

/* Make sure reminder items have proper positioning context */
.fc-reminder-item {
    position: relative;
    padding-right: 100px; /* Space for action buttons */
}

/* Mobile: Always show buttons */
@media (max-width: 768px) {
    .fc-item-actions {
        opacity: 1;
    }

    .fc-btn-icon {
        width: 44px;
        height: 44px;
    }
}

/* ===============================
   RADIO BUTTON GROUPS
   =============================== */

/* Radio group container */
.fc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

/* Compact horizontal layout for categories */
.fc-radio-group-compact {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

/* Scrollable group for long lists (recipes) */
.fc-radio-group-scrollable {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.fc-radio-group-scrollable::-webkit-scrollbar {
    width: 10px;
}

.fc-radio-group-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.fc-radio-group-scrollable::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}

.fc-radio-group-scrollable::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Radio option label (acts as button) */
.fc-radio-option {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border: 3px solid #ddd;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 56px; /* Touch-friendly size */
    position: relative;
    user-select: none;
}

.fc-radio-option:hover {
    border-color: var(--fc-primary, #FF6B6B);
    background: #fff5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fc-radio-option:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Radio input (hidden but functional) */
.fc-radio-input {
    margin: 0;
    margin-right: 12px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--fc-primary, #FF6B6B);
}

/* Radio label text */
.fc-radio-label {
    font-size: 16px;
    font-weight: 500;
    flex-grow: 1;
    cursor: pointer;
}

/* Checked state */
.fc-radio-input:checked + .fc-radio-label,
.fc-radio-option:has(.fc-radio-input:checked) .fc-radio-label {
    font-weight: 700;
}

.fc-radio-option:has(.fc-radio-input:checked) {
    border-color: var(--fc-primary, #FF6B6B);
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

/* Selection flash animation */
.fc-radio-selected {
    animation: fc-radio-flash 0.3s ease;
}

@keyframes fc-radio-flash {
    0% {
        background: #4CAF50;
        border-color: #4CAF50;
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Compact mode adjustments */
.fc-radio-group-compact .fc-radio-option {
    flex: 0 0 auto;
    padding: 10px 16px;
    min-height: 48px;
}

.fc-radio-group-compact .fc-radio-label {
    font-size: 15px;
}

/* Focus states for accessibility */
.fc-radio-input:focus {
    outline: 3px solid var(--fc-primary, #FF6B6B);
    outline-offset: 2px;
}

.fc-radio-input:focus-visible {
    outline: 3px solid var(--fc-primary, #FF6B6B);
    outline-offset: 2px;
}

/* Disabled state */
.fc-radio-option:has(.fc-radio-input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.fc-radio-option:has(.fc-radio-input:disabled):hover {
    transform: none;
    border-color: #ddd;
}

/* Touch-specific enhancements */
@media (hover: none) and (pointer: coarse) {
    .fc-radio-option {
        min-height: 64px; /* Larger for touch */
        padding: 16px 20px;
    }

    .fc-radio-input {
        width: 28px;
        height: 28px;
        margin-right: 16px;
    }

    .fc-radio-label {
        font-size: 18px;
    }

    .fc-radio-group-compact .fc-radio-option {
        min-height: 56px;
        padding: 12px 18px;
    }

    .fc-radio-group-compact .fc-radio-label {
        font-size: 16px;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .fc-radio-group-compact {
        flex-direction: column;
    }

    .fc-radio-group-scrollable {
        max-height: 200px;
    }

    .fc-radio-option {
        padding: 12px 16px;
    }

    .fc-radio-label {
        font-size: 15px;
    }
}

/* Dark mode support */
.fc-dark-mode .fc-radio-option {
    background: #2a2a2a;
    border-color: #444;
    color: #fff;
}

.fc-dark-mode .fc-radio-option:hover {
    background: #333;
    border-color: var(--fc-primary, #FF6B6B);
}

.fc-dark-mode .fc-radio-option:has(.fc-radio-input:checked) {
    background: linear-gradient(135deg, #3a2a2a 0%, #4a3333 100%);
    border-color: var(--fc-primary, #FF6B6B);
}

.fc-dark-mode .fc-radio-group-scrollable {
    background: #1a1a1a;
    border-color: #444;
}

.fc-dark-mode .fc-radio-group-scrollable::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.fc-dark-mode .fc-radio-group-scrollable::-webkit-scrollbar-thumb {
    background: #555;
}

.fc-dark-mode .fc-radio-group-scrollable::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Shopping Categories Radio Buttons */
.fc-shopping-category-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.fc-shopping-categories {
    margin-bottom: 10px;
    gap: 5px;
}

.fc-shopping-category-option {
    flex: 0 0 auto;
    padding: 5px 10px;
    min-height: 34px;
    font-size: 13px;
}

.fc-shopping-category-option .fc-radio-input {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

.fc-shopping-category-option .fc-radio-label {
    font-size: 13px;
    white-space: nowrap;
}

/* Touch devices - larger targets */
@media (hover: none) and (pointer: coarse) {
    .fc-shopping-category-option {
        padding: 8px 12px;
        min-height: 44px;
    }

    .fc-shopping-category-option .fc-radio-input {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }

    .fc-shopping-category-option .fc-radio-label {
        font-size: 14px;
    }
}

/* Mobile - stack vertically if needed */
@media (max-width: 600px) {
    .fc-shopping-categories {
        flex-direction: column;
    }

    .fc-shopping-category-option {
        width: 100%;
    }
}
