/* refined aesthetics v3 - minimal, no emojis, clean svg */

:root {
    /* Base Variables - Extra Creamy Light */
    --bg-primary: #FEF8F2;
    /* Fresh Cream */
    --bg-secondary: #F4EADF;
    /* Oat Milk */
    --bg-card: #FFFFFF;
    /* Pure White for crispness */

    --text-primary: #3E2723;
    /* Espresso Bean */
    --text-secondary: #5D4037;
    /* Cocoa Powder */
    --text-tertiary: #8D6E63;
    /* Light Roast */

    --border-color: #E7D7C9;
    /* Latte Foam */
    --border-hover: #D7CCC8;

    /* Brand Color */
    --accent-color: #3E2723;
    --accent-hover: #4E342E;
    --accent-soft: #FAF4EB;
    /* Warm froth */
    --accent-text: #3E2723;

    /* Refined Shadows - Warmer tone */
    --shadow-sm: 0 2px 4px 0 rgba(62, 39, 35, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(62, 39, 35, 0.08), 0 2px 6px -1px rgba(62, 39, 35, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(62, 39, 35, 0.08), 0 10px 10px -5px rgba(62, 39, 35, 0.03);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    --success-bg: #E8F5E9;
    --success-text: #1B5E20;
    --error-bg: #FFEBEE;
    --error-text: #B71C1C;
}

body.dark-mode {
    /* Base Variables - Velvet Espresso */
    --bg-primary: #120B09;
    /* Very Dark Roast */
    --bg-secondary: #1E1613;
    /* Dark Chocolate */
    --bg-card: #251C18;
    /* Espresso Shot */

    --text-primary: #ECE0D1;
    /* Crema */
    --text-secondary: #A1887F;
    /* Foamed Milk */
    --text-tertiary: #795548;
    /* Cinnamon */

    --border-color: #3E2723;
    --border-hover: #4E342E;

    --accent-color: #D7CCC8;
    /* Light Foam */
    --accent-hover: #EFEBE9;
    --accent-soft: rgba(215, 204, 200, 0.08);
    --accent-text: #D7CCC8;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.7);

    --success-bg: rgba(27, 94, 32, 0.2);
    --success-text: #A5D6A7;
    --error-bg: rgba(183, 28, 28, 0.2);
    --error-text: #EF9A9A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cooper Light BT', 'Cooper BT', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    line-height: 1.5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* App Logo */
.logo-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.brand-title {
    font-family: 'Cooper Light BT', 'Cooper BT', serif;
    font-size: 64px;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.app-logo {
    height: 120px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    /* This visually removes the white background by blending it with the underlying cream color */
}

/* Dark mode handling for the logo */
/* Assumes logo is black on white. 
   Invert makes it white on black. 
   Screen makes black transparent, keeping white logo. */
body.dark-mode .app-logo {
    filter: invert(1);
    mix-blend-mode: screen;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--text-primary);
    animation: spin 1s ease-in-out infinite;
}

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

body.dark-mode .loading-spinner {
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: var(--text-primary);
}

/* Card */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.4s ease, transform 0.2s ease;
}

/* Typography */
.title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    font-weight: 400;
}

.subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    color: var(--text-secondary);
    font-weight: 300;
}

/* Logo/Icon area in header */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: rotate(15deg);
}

.theme-icon {
    width: 20px;
    height: 20px;
}

.theme-icon.moon {
    display: none;
}

body.dark-mode .theme-icon.sun {
    display: none;
}

body.dark-mode .theme-icon.moon {
    display: block;
}

/* Upload Section */
.upload-label {
    margin-top: 32px;
    border: 2px dashed var(--border-color);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 64px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: fadeIn 0.3s ease;
}

.upload-label:hover {
    border-color: var(--accent-color);
    background: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-label.dragover {
    border-color: var(--accent-color);
    background: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Reset hover state when not visible */
.upload-label[style*="display: none"] {
    border-color: var(--border-color);
    background: var(--bg-secondary);
    transform: none;
    box-shadow: none;
}

.upload-icon-svg {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.upload-label:hover .upload-icon-svg {
    color: var(--accent-color);
}

.upload-text {
    font-weight: 400;
    color: var(--text-primary);
    font-size: 16px;
}

.upload-hint {
    font-size: 13px;
    color: var(--text-tertiary);
}

.upload-divider {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 8px 0;
    position: relative;
}

.upload-divider::before,
.upload-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.upload-divider span {
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
}

.btn-camera {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-camera:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-camera svg {
    width: 20px;
    height: 20px;
}

/* Camera Modal */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.camera-modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.camera-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.close-camera-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.close-camera-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

.camera-preview-container {
    position: relative;
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.camera-preview-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.camera-controls {
    padding: 24px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-capture {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-capture:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

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

.btn-capture svg {
    width: 32px;
    height: 32px;
}

.camera-error {
    padding: 16px 24px;
    background: var(--error-bg);
    color: var(--error-text);
    margin: 0 24px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border-radius: var(--radius-sm);
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .btn-secondary {
    background: var(--bg-card);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

/* Event Result Box */
.calendar-event-box {
    margin-top: 32px;
    background: var(--bg-primary);
    /* Slightly different from card bg in dark mode */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    animation: fadeInUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.calendar-event-box.fade-out {
    animation: fadeOutDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body.dark-mode .calendar-event-box {
    background: var(--bg-secondary);
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

.calendar-event-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.calendar-event-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.meta-date {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-type {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: 100px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

body.dark-mode .meta-type {
    background: var(--bg-card);
}

.calendar-event-title {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.3;
}

.calendar-event-body {
    padding: 24px;
}

.detail-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-icon {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 11px;
    text-transform: uppercase;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.detail-text,
.time-value {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

body.dark-mode .detail-text,
body.dark-mode .time-value {
    color: var(--text-secondary);
    /* Keep it slightly muted for elegance */
}

.time-value {
    display: flex;
    align-items: center;
    gap: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    color: var(--text-primary);
}

.time-separator {
    color: var(--text-tertiary);
}

.calendar-description {
    font-size: 14px;
    margin-top: 4px;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.calendar-event-footer {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 12px;
}

body.dark-mode .calendar-event-footer {
    background: var(--bg-card);
}

.calendar-event-footer .btn {
    width: 100%;
    background: var(--text-primary);
    color: var(--bg-primary);
}

.calendar-event-footer .btn:hover {
    background: var(--text-secondary);
}

/* Status Messages */
.status-message {
    margin-top: 24px;
    padding: 16px;
    border-radius: var(--radius-sm);
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-align: center;
    font-weight: 400;
}

.status-message.success {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-message.error {
    background: var(--error-bg);
    color: var(--error-text);
}

.status-message.info {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* Raw JSON - Hidden completely as requested */
.calendar-raw-json {
    display: none !important;
}

/* Preview */
.preview-section {
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease;
}

.preview-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.preview-container img {
    width: 100%;
    display: block;
    background: var(--bg-secondary);
}

/* Scanning Animation */
.preview-container.processing {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 4px var(--accent-color) !important;
}

.preview-container.processing::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Warm Mocha/Gold Scan Line for Light Mode */
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(161, 136, 127, 0.2) 40%,
            rgba(62, 39, 35, 0.6) 50%,
            rgba(161, 136, 127, 0.2) 60%,
            transparent 100%);
    animation: scan 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: 5;
    backdrop-filter: blur(2px);
    /* Ensure it's removed when processing class is removed */
    opacity: 1;
    transition: opacity 0.3s ease;
}

.preview-container:not(.processing)::after {
    display: none;
}

body.dark-mode .preview-container.processing::after {
    /* Bright Cream/Latte Scan Line for Dark Mode */
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(215, 204, 200, 0.1) 40%,
            rgba(239, 235, 233, 0.5) 50%,
            rgba(215, 204, 200, 0.1) 60%,
            transparent 100%);
}

@keyframes scan {
    0% {
        transform: translateY(-150%);
    }

    100% {
        transform: translateY(150%);
    }
}

.remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.action-buttons .btn {
    flex: 1;
}

.action-buttons #changeBtn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.action-buttons #changeBtn:hover {
    border-color: var(--text-primary);
}

.action-buttons #submitBtn {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: 1px solid var(--text-primary);
}

.action-buttons #submitBtn:hover {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
}

/* Retake Photo Button Container */
.retake-button-container {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.btn-retake {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-retake:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-retake svg {
    width: 16px;
    height: 16px;
}

/* Calendar Connection */
.calendar-connection-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.connection-status-text {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* Success Confirmation Box - Minimalistic */
.success-confirmation {
    margin-top: 20px;
    animation: slideUpFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-confirmation.fade-out {
    animation: fadeOutSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.success-confirmation-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.success-confirmation-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    animation: shimmer 0.8s ease-out 0.3s;
}

body.dark-mode .success-confirmation-content::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.success-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: checkmarkPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.success-icon::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.4;
    animation: ripple 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.success-icon svg {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
}

@keyframes slideUpFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.96);
    }
    60% {
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeOutSlideUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-15px) scale(0.96);
    }
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.2) rotate(10deg);
    }
    80% {
        transform: scale(0.95) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.success-content-text {
    flex: 1;
    min-width: 0;
}

.success-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.success-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.success-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.btn-view-event {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    font-size: 13px;
}

.btn-view-event:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-view-event svg {
    width: 14px;
    height: 14px;
}

.btn-close-success {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
}

.btn-close-success:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    color: var(--text-primary);
}
/* Donation Section */
.donation-section {
    margin-top: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
}

body.dark-mode .donation-section {
    background: linear-gradient(135deg, #2d1f1f 0%, #1f1515 100%);
    border-color: #4a2c2c;
}

.donation-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.donation-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.donation-heart {
    font-size: 18px;
}

.btn-donate {
    padding: 8px 20px;
    background: #e11d48;
    color: white;
    border: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-donate:hover {
    background: #be123c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

/* Donation Modal */
.donation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.donation-modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.donation-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.donation-close-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.donation-header {
    text-align: center;
    margin-bottom: 24px;
}

.donation-modal-heart {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.donation-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.donation-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.donation-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.amount-btn {
    padding: 14px 8px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.amount-btn:hover {
    border-color: #e11d48;
    background: #fef2f2;
}

body.dark-mode .amount-btn:hover {
    background: #2d1f1f;
}

.amount-btn.selected {
    border-color: #e11d48;
    background: #e11d48;
    color: white;
}

.custom-amount-container {
    margin-bottom: 24px;
}

.custom-amount-container label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.custom-amount-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.custom-amount-input:focus-within {
    border-color: #e11d48;
}

.currency-symbol {
    padding: 12px 14px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 500;
}

.custom-amount-input input {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.custom-amount-input input::placeholder {
    color: var(--text-tertiary);
}

.btn-proceed-donate {
    width: 100%;
    padding: 14px;
    background: #e11d48;
    color: white;
    border: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-proceed-donate:hover {
    background: #be123c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.btn-proceed-donate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.donation-secure {
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 16px 0 0 0;
}

/* Donation Section - Updated */
.donation-icon {
    color: #e11d48;
}

.donation-expanded {
    padding: 4px 0;
}

.donation-expanded-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.donation-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.donation-back-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.donation-expanded-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.donation-expanded-subtitle {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0 0 16px 0;
    padding-left: 36px;
}

.stripe-button-container {
    display: flex;
    justify-content: center;
    padding: 8px 0;
}

/* Override Stripe button container for better fit */
.stripe-button-container stripe-buy-button {
    width: 100%;
}

/* Donate link as button */
a.btn-donate {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Centered Donation Section */
.donation-section-centered {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.btn-donate-styled {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-donate-styled:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.45);
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}

.btn-donate-styled:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.3);
}

.btn-donate-styled .donate-heart {
    color: white;
    animation: heartbeat 1.5s ease-in-out infinite;
}

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

/* Dark mode adjustments */
body.dark-mode .btn-donate-styled {
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.25);
}

body.dark-mode .btn-donate-styled:hover {
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.35);
}

/* Donation Block - Aesthetic Card */
.donation-block {
    margin-top: 24px;
    padding: 28px 24px;
    background: linear-gradient(135deg, #fdf2f4 0%, #fce7ea 100%);
    border: 1px solid #fecdd3;
    border-radius: var(--radius-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.dark-mode .donation-block {
    background: linear-gradient(135deg, #2a1a1d 0%, #1f1214 100%);
    border-color: #4a2532;
}

.donation-block-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.donation-block-icon svg {
    animation: heartbeat 1.5s ease-in-out infinite;
}

.donation-block-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.donation-block-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    max-width: 280px;
}

.donation-block-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.donation-block-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(62, 39, 35, 0.2);
}

body.dark-mode .donation-block-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Support Section - Matches Calendar Section */
.support-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.support-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.support-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.support-label h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.support-icon {
    color: #e11d48;
    flex-shrink: 0;
}

.support-text {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 0;
    padding-left: 24px;
}

.btn-support {
    padding: 8px 20px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-support:hover {
    background: var(--accent-soft);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Cross-browser consistency for buttons */
.btn-support,
.btn-secondary,
.btn-primary {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.4;
}

/* Ensure consistent flexbox across browsers */
.support-section,
.calendar-connection-section {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

/* Button reset for consistent look */
button.btn-support {
    background-color: transparent;
    border-width: 1px;
    border-style: solid;
    border-color: var(--border-color);
    outline: none;
}

button.btn-support:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

button.btn-support:focus:not(:focus-visible) {
    outline: none;
}

button.btn-support:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* App Footer */
.app-footer {
    text-align: center;
    padding: 20px 0 8px 0;
    font-size: 12px;
    color: var(--text-tertiary);
}

.app-footer a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.app-footer a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

.footer-divider {
    margin: 0 8px;
    opacity: 0.5;
}

/* App Footer - Professional */
.app-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 0 12px 0;
    margin-top: 8px;
}

.footer-brand {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.5px;
    opacity: 0.6;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-links a {
    font-size: 12px;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.footer-links a:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.footer-dot {
    width: 3px;
    height: 3px;
    background: var(--text-tertiary);
    border-radius: 50%;
    opacity: 0.4;
}

.footer-copy {
    font-size: 11px;
    color: var(--text-tertiary);
    opacity: 0.5;
}

/* Hide old footer styles */
.footer-divider {
    display: none;
}

/* Footer Centering Fix */
.app-footer {
    text-align: center;
    justify-content: center;
    width: 100%;
}

.footer-links {
    justify-content: center;
}
