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

:root {
    --bg-color: #2a2a2a;
    --text-color: #ffffff;
    --dot-default: #4a4a4a;
    --modal-bg: #3a3a3a;

    /* Mood colors */
    --progress: #4CAF50;
    --calm: #2196F3;
    --happy: #FFEB3B;
    --creative: #9C27B0;
    --stressed: #f44336;
    --bad-day: #000000;
    --peak-day: #FFD700;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 800;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.app-container {
    padding: 20px;
    padding-top: env(safe-area-inset-top, 20px);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    max-width: 100%;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.global-filters {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-dropdown {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background-color: var(--modal-bg);
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    min-width: 120px;
}

.filter-dropdown:focus {
    outline: 2px solid var(--calm);
    outline-offset: 2px;
}

.filter-dropdown option {
    background-color: var(--modal-bg);
    color: var(--text-color);
}

.legend-toggle {
    position: absolute;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--modal-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
}

.dots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18px, 1fr));
    gap: 6px;
    justify-content: center;
    padding: 10px 0;
}

/* Mood Stats Section */
.mood-stats {
    margin-top: 24px;
    padding: 16px;
    background-color: var(--modal-bg);
    border-radius: 12px;
}
 
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
 
.stat-label {
    font-size: 0.9rem;
    color: #ccc;
}
 
.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
}
 
/* Mood text colors */
.mood-color-progress { color: var(--progress); }
.mood-color-calm { color: var(--calm); }
.mood-color-happy { color: var(--happy); }
.mood-color-creative { color: var(--creative); }
.mood-color-stressed { color: var(--stressed); }
.mood-color-bad-day { color: var(--bad-day); }
.mood-color-peak-day { color: var(--peak-day); }

/* Insights Section (formerly Patterns) */
.patterns-section {
    display: none;
}

.patterns-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.patterns-header h3 {
    font-size: 1rem;
    color: #ccc;
    margin: 0;
}

.window-selector {
    display: flex;
    gap: 4px;
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 4px;
}

.window-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background-color: transparent;
    color: #888;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.window-btn:hover {
    color: var(--text-color);
}

.window-btn.active {
    background-color: var(--modal-bg);
    color: var(--text-color);
}

.patterns-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pattern-card {
    background-color: var(--bg-color);
    border-radius: 10px;
    padding: 14px;
    position: relative;
}

.pattern-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.pattern-card-content {
    flex: 1;
}

.pattern-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1.3;
}

.pattern-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.confidence-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.confidence-badge.high {
    background-color: rgba(76, 175, 80, 0.2);
    color: var(--progress);
}

.confidence-badge.medium {
    background-color: rgba(255, 235, 59, 0.2);
    color: #ffd600;
}

.confidence-badge.low {
    background-color: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}


.most-common-mood-stat {
    font-size: 0.75rem;
    color: #888;
}

.pattern-actions {
    display: flex;
    gap: 4px;
}

.pattern-action-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.pattern-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.pattern-action-btn.toggle-btn {
    color: #555;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1;
}

.pattern-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: #aaa;
    line-height: 1.5;
    display: none;
}

.pattern-details.show {
    display: block;
}

.patterns-message,
.patterns-note-message {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.85rem;
}

.patterns-note-message {
    padding-top: 10px;
    font-size: 0.8rem;
    color: #777;
}

.patterns-empty {
    text-align: center;
    padding: 24px;
    color: #666;
}

.patterns-empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

.patterns-empty-text {
    font-size: 0.85rem;
}

/* Mood Cards Section */
.mood-cards-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mood-cards-header {
    margin-bottom: 12px;
}

.mood-cards-header h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    opacity: 0.8;
}

.mood-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mood-stat-card {
    padding: 12px;
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 180px;
}

.mood-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mood-card-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mood-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mood-card-percentage {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    opacity: 0.9;
}

.mood-stat-detail {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
}

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

.mood-stat-detail.mood-insight {
    color: #aaa;
    font-style: italic;
}

.day-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--dot-default);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    position: relative;
}

.day-dot:hover {
    transform: scale(1.2);
}

.day-dot:active {
    transform: scale(0.95);
}

.day-dot.today {
    box-shadow: 0 0 0 2px var(--text-color);
}

/* Future date shake animation */
@keyframes shake-future {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.day-dot.future-shake {
    animation: shake-future 0.5s ease-in-out;
    background-color: rgba(255, 107, 107, 0.6) !important;
}

/* Future date alert message */
.future-date-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff6b6b;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 8px;
    background-color: rgba(40, 40, 40, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    text-align: center;
    max-width: 280px;
}

.future-date-alert.show {
    opacity: 1;
}

/* Mood color classes */
.day-dot.progress, .mood-btn.progress, .dot-preview.progress { background-color: var(--progress); }
.day-dot.calm, .mood-btn.calm, .dot-preview.calm { background-color: var(--calm); }
.day-dot.happy, .mood-btn.happy, .dot-preview.happy { background-color: var(--happy); color: #333; }
.day-dot.creative, .mood-btn.creative, .dot-preview.creative { background-color: var(--creative); }
.day-dot.stressed, .mood-btn.stressed, .dot-preview.stressed { background-color: var(--stressed); }
.day-dot.bad-day, .mood-btn.bad-day, .dot-preview.bad-day { background-color: var(--bad-day); }

/* Note: peak-day styles (color, shape, shimmer) are now generated dynamically in JavaScript */
/* The golden-shimmer animation is kept here for backwards compatibility */

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

/* Legend panel */
.legend {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--modal-bg);
    padding: 24px;
    border-radius: 16px;
    z-index: 100;
    max-width: 300px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.legend.show {
    display: block;
}

.legend h3 {
    margin-bottom: 16px;
    text-align: center;
}

.legend-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.dot-preview {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 200;
    padding: 20px;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--modal-bg);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Streak break confirmation modal */
.confirm-modal {
    z-index: 300;
}

.confirm-content {
    max-width: 300px;
    text-align: center;
    padding: 24px;
}

.confirm-message p {
    margin: 0 0 8px 0;
    color: #ff6b6b;
    font-weight: 500;
}

.confirm-message .confirm-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.confirm-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.confirm-btn:hover {
    opacity: 0.9;
}

.confirm-cancel {
    background-color: var(--dot-default);
    color: var(--text-color);
}

.confirm-proceed {
    background-color: #ff6b6b;
    color: white;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
}

.legend .close-btn {
    display: block;
    margin: 20px auto 0;
    font-size: 1rem;
    padding: 10px 24px;
    background-color: var(--dot-default);
    border-radius: 8px;
}

.mood-selector h3,
.notes-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #ccc;
}

.mood-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.mood-btn {
    padding: 12px 8px;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    color: white;
}

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

.mood-btn.selected {
    box-shadow: 0 0 0 3px var(--text-color);
}

.notes-section textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    resize: vertical;
}

.notes-section textarea::placeholder {
    color: #888;
}

.save-btn {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    border: none;
    border-radius: 10px;
    background-color: var(--progress);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.save-btn:active {
    opacity: 0.8;
}

/* Overlay for legend */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.overlay.show {
    display: block;
}

/* Responsive adjustments */
@media (min-width: 500px) {
    .dots-container {
        grid-template-columns: repeat(20, 18px);
        justify-content: center;
    }
}

@media (max-width: 350px) {
    .day-dot {
        width: 14px;
        height: 14px;
    }

    .dots-container {
        gap: 4px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: light) {
    :root {
        --bg-color: #f5f5f5;
        --text-color: #333333;
        --dot-default: #cccccc;
        --modal-bg: #ffffff;
    }
}

/* ===============================
   SETTINGS BUTTON & MODAL
   =============================== */

.settings-btn {
    position: absolute;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--modal-bg);
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
}

.settings-btn:hover {
    transform: scale(1.1);
    background-color: #4a4a4a;
}

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

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

/* Settings Modal */
.settings-modal .settings-content {
    max-width: 500px;
    max-height: 85vh;
}

.settings-ribbon {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ribbon-header {
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.ribbon-header h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--text-color);
}

.ribbon-description {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

/* Mood Customization List */
.mood-customization-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 4px;
}

.mood-customization-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background-color: var(--modal-bg);
    border-radius: 10px;
    padding: 12px;
}

.mood-color-preview {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.mood-color-preview:hover {
    transform: scale(1.1);
}

.mood-name-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    order: 2;
    flex-basis: 100%;
    margin-top: 4px;
}

.mood-name-input:focus {
    outline: 2px solid var(--calm);
    outline-offset: 1px;
}

.mood-effect-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background-color: var(--bg-color);
    color: #aaa;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    order: 4;
}

.mood-effect-btn:hover {
    background-color: #4a4a4a;
    color: var(--text-color);
}

.mood-delete-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background-color: transparent;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    order: 5;
}

.mood-delete-btn:hover {
    background-color: rgba(244, 67, 54, 0.2);
    color: var(--stressed);
}

.mood-delete-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Add Mood Button */
.add-mood-btn {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border: 2px dashed #555;
    border-radius: 10px;
    background-color: transparent;
    color: #888;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-mood-btn:hover {
    border-color: var(--calm);
    color: var(--calm);
    background-color: rgba(33, 150, 243, 0.1);
}

.add-mood-btn span {
    font-size: 1.2rem;
    margin-right: 6px;
}

/* Settings Actions */
.settings-actions {
    display: flex;
    gap: 12px;
}

.reset-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background-color: var(--bg-color);
    color: #888;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    background-color: rgba(244, 67, 54, 0.2);
    color: var(--stressed);
}

.settings-actions .save-btn {
    flex: 1;
}

/* ===============================
   COLOR PICKER MODAL
   =============================== */

.color-picker-modal .color-picker-content {
    max-width: 360px;
}

.color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
}

.color-preview-large {
    width: 100%;
    height: 80px;
    border-radius: 12px;
    background-color: #808080;
    transition: background-color 0.1s;
}

.rgb-sliders {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.slider-group label {
    width: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #888;
}

.color-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #000, #fff);
    cursor: pointer;
}

.color-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-color);
    border: 2px solid var(--bg-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.color-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-color);
    border: 2px solid var(--bg-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.red-slider {
    background: linear-gradient(to right, #000, #ff0000);
}

.green-slider {
    background: linear-gradient(to right, #000, #00ff00);
}

.blue-slider {
    background: linear-gradient(to right, #000, #0000ff);
}

.color-value {
    width: 55px;
    padding: 6px 8px;
    border: none;
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.color-value:focus {
    outline: 2px solid var(--calm);
}

.hex-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hex-input-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #888;
}

.hex-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: monospace;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
}

.hex-input:focus {
    outline: 2px solid var(--calm);
}

/* ===============================
   EFFECT PICKER MODAL
   =============================== */

.effect-picker-modal .effect-picker-content {
    max-width: 450px;
    max-height: 85vh;
}

.effect-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.effect-category h4 {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 4px;
}

.category-description {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 12px;
}

.effect-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.effect-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border: 2px solid transparent;
    border-radius: 10px;
    background-color: var(--bg-color);
    cursor: pointer;
    transition: all 0.2s;
}

.effect-option:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.effect-option.selected {
    border-color: var(--calm);
    background-color: rgba(33, 150, 243, 0.1);
}

.effect-preview {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--calm);
}

.effect-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #aaa;
}

.effect-option.selected .effect-name {
    color: var(--text-color);
}

/* ===============================
   MOOD EFFECTS - Applied to dots
   =============================== */

/* Soft Glow Effect */
.effect-soft-glow {
    box-shadow: 0 0 8px 2px currentColor;
}

.day-dot.effect-soft-glow,
.mood-btn.effect-soft-glow,
.dot-preview.effect-soft-glow {
    box-shadow: 0 0 10px 3px var(--mood-color, currentColor);
}

/* Soft Glow with selected state - keep white border visible */
.mood-btn.effect-soft-glow.selected {
    box-shadow: 0 0 0 3px var(--text-color), 0 0 10px 3px var(--mood-color, currentColor);
}

/* Breathing / Pulse Effect */
@keyframes breathing {
    0%, 100% {
        opacity: 0.35;
        transform: scale(0.95);
        filter: brightness(0.6);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
        filter: brightness(1);
    }
}

.effect-breathing {
    animation: breathing 2.5s ease-in-out infinite;
}

.day-dot.effect-breathing,
.mood-btn.effect-breathing,
.dot-preview.effect-breathing {
    animation: breathing 2.5s ease-in-out infinite;
}

/* Gradient Drift Effect */
@keyframes gradient-drift {
    0% { filter: hue-rotate(0deg) saturate(1); }
    25% { filter: hue-rotate(45deg) saturate(1.2); }
    50% { filter: hue-rotate(0deg) saturate(1); }
    75% { filter: hue-rotate(-45deg) saturate(1.2); }
    100% { filter: hue-rotate(0deg) saturate(1); }
}

.effect-gradient-drift {
    animation: gradient-drift 2s ease-in-out infinite;
}

.day-dot.effect-gradient-drift,
.mood-btn.effect-gradient-drift,
.dot-preview.effect-gradient-drift {
    animation: gradient-drift 2s ease-in-out infinite;
}

/* Sparkle Effect - Firework burst inside the dot */
@keyframes sparkle {
    0%, 100% {
        box-shadow:
            inset 0 0 2px rgba(255, 255, 255, 0.3);
    }
    15% {
        box-shadow:
            inset 0 0 4px rgba(255, 255, 255, 0.9),
            inset 3px 0 3px rgba(255, 255, 255, 0.8),
            inset -3px 0 3px rgba(255, 255, 255, 0.8),
            inset 0 3px 3px rgba(255, 255, 255, 0.8),
            inset 0 -3px 3px rgba(255, 255, 255, 0.8),
            inset 2px 2px 2px rgba(255, 255, 255, 0.7),
            inset -2px 2px 2px rgba(255, 255, 255, 0.7),
            inset 2px -2px 2px rgba(255, 255, 255, 0.7),
            inset -2px -2px 2px rgba(255, 255, 255, 0.7);
    }
    30% {
        box-shadow:
            inset 0 0 6px rgba(255, 255, 255, 0.6),
            inset 5px 0 4px rgba(255, 255, 255, 0.5),
            inset -5px 0 4px rgba(255, 255, 255, 0.5),
            inset 0 5px 4px rgba(255, 255, 255, 0.5),
            inset 0 -5px 4px rgba(255, 255, 255, 0.5),
            inset 4px 4px 3px rgba(255, 255, 255, 0.4),
            inset -4px 4px 3px rgba(255, 255, 255, 0.4),
            inset 4px -4px 3px rgba(255, 255, 255, 0.4),
            inset -4px -4px 3px rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow:
            inset 0 0 2px rgba(255, 255, 255, 0.2);
    }
}

.effect-sparkle {
    animation: sparkle 0.8s ease-out infinite;
    overflow: hidden;
}

.day-dot.effect-sparkle,
.mood-btn.effect-sparkle,
.dot-preview.effect-sparkle {
    animation: sparkle 0.8s ease-out infinite;
    position: relative;
    overflow: hidden;
}

/* Shimmer Effect - Moving shine across the dot */
@keyframes shimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

.effect-shimmer {
    background-size: 300% 100% !important;
    animation: shimmer 1s linear infinite;
}

.day-dot.effect-shimmer,
.mood-btn.effect-shimmer,
.dot-preview.effect-shimmer {
    background: linear-gradient(
        90deg,
        var(--mood-color, currentColor) 0%,
        var(--mood-color, currentColor) 30%,
        color-mix(in srgb, var(--mood-color, currentColor) 50%, white) 50%,
        var(--mood-color, currentColor) 70%,
        var(--mood-color, currentColor) 100%) !important;
    background-size: 300% 100%;
    animation: shimmer 1s linear infinite;
}

/* Expand Effect - Pulsing scale animation */
@keyframes expand {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.25);
    }
}

.effect-expand {
    animation: expand 0.8s ease-in-out infinite;
}

.day-dot.effect-expand,
.mood-btn.effect-expand,
.dot-preview.effect-expand {
    animation: expand 0.8s ease-in-out infinite;
}

/* Slow Blink Effect */
@keyframes slow-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.effect-slow-blink {
    animation: slow-blink 1.2s ease-in-out infinite;
}

.day-dot.effect-slow-blink,
.mood-btn.effect-slow-blink,
.dot-preview.effect-slow-blink {
    animation: slow-blink 1.2s ease-in-out infinite;
}

/* Outline Only Effect */
.effect-outline-only {
    background: transparent !important;
    border: 3px solid currentColor;
}

.day-dot.effect-outline-only,
.mood-btn.effect-outline-only,
.dot-preview.effect-outline-only {
    background: transparent !important;
    border: 3px solid var(--mood-color, currentColor);
}

/* Pattern Fill - Dots */
.effect-pattern-dots {
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 1px, transparent 1px) !important;
    background-size: 4px 4px !important;
}

.day-dot.effect-pattern-dots,
.mood-btn.effect-pattern-dots,
.dot-preview.effect-pattern-dots {
    position: relative;
}

.day-dot.effect-pattern-dots::after,
.mood-btn.effect-pattern-dots::after,
.dot-preview.effect-pattern-dots::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background-image: radial-gradient(circle, rgba(255,255,255,0.4) 1px, transparent 1px);
    background-size: 4px 4px;
}

/* Pattern Fill - Lines */
.effect-pattern-lines {
    position: relative;
}

.day-dot.effect-pattern-lines::after,
.mood-btn.effect-pattern-lines::after,
.dot-preview.effect-pattern-lines::after,
.effect-preview.effect-pattern-lines::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.3) 2px,
        rgba(255,255,255,0.3) 4px
    );
}

.effect-preview.effect-pattern-lines {
    position: relative;
}

/* Pattern Fill - Crosshatch */
.effect-pattern-crosshatch {
    position: relative;
}

.day-dot.effect-pattern-crosshatch::after,
.mood-btn.effect-pattern-crosshatch::after,
.dot-preview.effect-pattern-crosshatch::after,
.effect-preview.effect-pattern-crosshatch::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.2) 2px,
            rgba(255,255,255,0.2) 4px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.2) 2px,
            rgba(255,255,255,0.2) 4px
        );
}

.effect-preview.effect-pattern-crosshatch {
    position: relative;
}

/* ===============================
   SHAPE PICKER MODAL
   =============================== */

.shape-picker-modal .shape-picker-content {
    max-width: 400px;
}

.shape-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.shape-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    border: 2px solid transparent;
    border-radius: 10px;
    background-color: var(--bg-color);
    cursor: pointer;
    transition: all 0.2s;
}

.shape-option:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.shape-option.selected {
    border-color: var(--calm);
    background-color: rgba(33, 150, 243, 0.1);
}

.shape-preview {
    width: 36px;
    height: 36px;
    background-color: var(--calm);
}

.shape-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #aaa;
}

.shape-option.selected .shape-name {
    color: var(--text-color);
}

/* Shape button in customization list */
.mood-shape-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background-color: var(--bg-color);
    color: #aaa;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    order: 3;
}

.mood-shape-btn:hover {
    background-color: #4a4a4a;
    color: var(--text-color);
}

/* ===============================
   SHAPE CLIP-PATH DEFINITIONS
   =============================== */

/* Circle (default) */
.shape-circle {
    clip-path: circle(50%);
    border-radius: 50%;
}

/* Square */
.shape-square {
    clip-path: none;
    border-radius: 0;
}

/* Rounded Square */
.shape-rounded-square {
    clip-path: none;
    border-radius: 4px;
}

/* Triangle Up */
.shape-triangle-up {
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    border-radius: 0;
}

/* Triangle Down */
.shape-triangle-down {
    clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
    border-radius: 0;
}

/* Diamond */
.shape-diamond {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    border-radius: 0;
}

/* Star */
.shape-star {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    border-radius: 0;
}

/* Hexagon */
.shape-hexagon {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    border-radius: 0;
}

/* Half Circle */
.shape-half-circle {
    clip-path: ellipse(50% 100% at 50% 100%);
    border-radius: 0;
}

/* Outline Only */
.shape-outline {
    background: transparent !important;
    border: 3px solid var(--calm);
    border-radius: 50%;
}

/* ===============================
   DYNAMIC MOOD STYLES
   =============================== */

/* These will be generated dynamically by JavaScript */
.dynamic-mood-styles {
    /* Placeholder for dynamically injected mood color styles */
}

/* ===============================
   RESPONSIVE ADJUSTMENTS
   =============================== */

@media (max-width: 500px) {
    .effect-options {
        grid-template-columns: 1fr;
    }

    .settings-actions {
        flex-direction: column;
    }
}

/* ===============================
   BOTTOM NAVIGATION BAR
   =============================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background-color: var(--bg-color);
    z-index: 100;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--text-color);
}

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

/* Circular buttons (left and right) */
.nav-btn-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #333333;
    box-shadow:
        inset 2px 2px 4px rgba(0, 0, 0, 0.4),
        inset -2px -2px 4px rgba(60, 60, 60, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-btn-circle:hover {
    background-color: #3a3a3a;
}

.nav-btn-circle.active {
    background-color: #3d3d3d;
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.5),
        inset -2px -2px 4px rgba(70, 70, 70, 0.3);
}

/* Pill button (center - Journal) */
.nav-btn-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 50px;
    background-color: #333333;
    box-shadow:
        inset 2px 2px 4px rgba(0, 0, 0, 0.4),
        inset -2px -2px 4px rgba(60, 60, 60, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-btn-pill:hover {
    background-color: #3a3a3a;
}

.nav-btn-pill.active {
    background-color: #3d3d3d;
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.5),
        inset -2px -2px 4px rgba(70, 70, 70, 0.3);
}

.nav-btn-pill span {
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
}

.nav-btn svg {
    flex-shrink: 0;
}

/* Add padding to app container to account for bottom nav */
.app-container {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 20px));
}

/* Section visibility for navigation */
.main-content {
    display: block;
}

.main-content.hidden {
    display: none;
}

.customize-view {
    display: none;
}

.customize-view.active {
    display: block;
}

.patterns-section.active {
    display: block;
    margin-top: 20px;
    padding: 16px;
    background-color: var(--modal-bg);
    border-radius: 12px;
}

/* Light mode adjustments for bottom nav */
@media (prefers-color-scheme: light) {
    .nav-btn-circle,
    .nav-btn-pill {
        background-color: #e8e8e8;
        box-shadow:
            inset 2px 2px 4px rgba(200, 200, 200, 0.6),
            inset -2px -2px 4px rgba(255, 255, 255, 0.8),
            0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .nav-btn-circle:hover,
    .nav-btn-pill:hover {
        background-color: #f0f0f0;
    }

    .nav-btn-circle.active,
    .nav-btn-pill.active {
        background-color: #ddd;
        box-shadow:
            inset 3px 3px 6px rgba(180, 180, 180, 0.6),
            inset -2px -2px 4px rgba(255, 255, 255, 0.6);
    }
}

/* ===============================
   VALENTINE'S DAY ANIMATION
   =============================== */

/* During Valentine's animation, dots container uses fixed 20-column grid */
.dots-container.valentines-animation {
    grid-template-columns: repeat(20, 18px) !important;
    justify-content: center;
    position: relative;
}

/* Dots during Valentine's animation get absolute positioning for transforms */
.dots-container.valentines-animation .day-dot {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Faster transitions during scroll phase */
.dots-container.valentines-scrolling .day-dot {
    transition: transform 0.1s ease-out,
                background-color 0.1s ease,
                box-shadow 0.1s ease;
}

/* Heart dot styling */
.day-dot.valentine-heart {
    background-color: #e63946 !important;
    box-shadow: 0 0 8px 2px rgba(230, 57, 70, 0.5) !important;
}

/* Glowing heart effect */
.day-dot.valentine-heart.glowing {
    animation: valentine-glow 1s ease-in-out infinite;
}

@keyframes valentine-glow {
    0%, 100% {
        box-shadow: 0 0 8px 2px rgba(230, 57, 70, 0.5);
    }
    50% {
        box-shadow: 0 0 16px 4px rgba(230, 57, 70, 0.7);
    }
}

/* Extra dots added for animation (beyond 365) */
.day-dot.valentine-extra {
    pointer-events: none;
}

/* Small screen adjustments */
@media (max-width: 420px) {
    .dots-container.valentines-animation {
        grid-template-columns: repeat(20, 14px) !important;
        gap: 4px;
    }
}

/* ===============================
   CHRISTMAS ANIMATION
   =============================== */

/* During Christmas animation, dots container uses fixed 20-column grid */
.dots-container.christmas-animation {
    grid-template-columns: repeat(20, 18px) !important;
    justify-content: center;
    position: relative;
}

/* Dots during Christmas animation get absolute positioning for transforms */
.dots-container.christmas-animation .day-dot {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Faster transitions during scroll phase */
.dots-container.christmas-scrolling .day-dot {
    transition: transform 0.1s ease-out,
                background-color 0.1s ease,
                box-shadow 0.1s ease;
}

/* Christmas tree dot styling - festive green */
.day-dot.christmas-tree {
    background-color: #228B22 !important;
    box-shadow: 0 0 8px 2px rgba(34, 139, 34, 0.5) !important;
}

/* Glowing tree effect */
.day-dot.christmas-tree.glowing {
    animation: christmas-glow 1s ease-in-out infinite;
}

@keyframes christmas-glow {
    0%, 100% {
        box-shadow: 0 0 8px 2px rgba(34, 139, 34, 0.5);
    }
    50% {
        box-shadow: 0 0 16px 4px rgba(34, 139, 34, 0.7);
    }
}

/* Golden star at the top */
.day-dot.christmas-star {
    background-color: #FFD700 !important;
    box-shadow: 0 0 12px 4px rgba(255, 215, 0, 0.6) !important;
}

/* Glowing star effect - brighter twinkle */
.day-dot.christmas-star.glowing {
    animation: star-glow 0.8s ease-in-out infinite;
}

@keyframes star-glow {
    0%, 100% {
        box-shadow: 0 0 12px 4px rgba(255, 215, 0, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px 8px rgba(255, 215, 0, 0.9);
        transform: scale(1.1);
    }
}

/* Christmas ornaments - colorful decorations */
.day-dot.christmas-ornament {
    box-shadow: 0 0 8px 2px rgba(255, 0, 0, 0.5) !important;
}

/* Cycle through ornament colors using nth-child */
.day-dot.christmas-ornament:nth-child(4n+1) {
    background-color: #FF0000 !important; /* Red */
}
.day-dot.christmas-ornament:nth-child(4n+2) {
    background-color: #1E90FF !important; /* Blue */
}
.day-dot.christmas-ornament:nth-child(4n+3) {
    background-color: #FFD700 !important; /* Gold */
}
.day-dot.christmas-ornament:nth-child(4n) {
    background-color: #C0C0C0 !important; /* Silver */
}

/* Glowing ornament effect */
.day-dot.christmas-ornament.glowing {
    animation: ornament-glow 1.2s ease-in-out infinite;
}

@keyframes ornament-glow {
    0%, 100% {
        box-shadow: 0 0 8px 3px currentColor;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 14px 5px currentColor;
        transform: scale(1.05);
    }
}

/* Reindeer body - warm brown */
.day-dot.reindeer-body {
    background-color: #8B4513 !important;
    box-shadow: 0 0 6px 2px rgba(139, 69, 19, 0.5) !important;
}

.day-dot.reindeer-body.glowing {
    animation: reindeer-glow 0.8s ease-in-out infinite;
}

@keyframes reindeer-glow {
    0%, 100% {
        box-shadow: 0 0 6px 2px rgba(139, 69, 19, 0.5);
    }
    50% {
        box-shadow: 0 0 10px 4px rgba(139, 69, 19, 0.7);
    }
}

/* Rudolph's red nose */
.day-dot.reindeer-nose {
    background-color: #FF0000 !important;
    box-shadow: 0 0 12px 4px rgba(255, 0, 0, 0.7) !important;
}

.day-dot.reindeer-nose.glowing {
    animation: nose-glow 0.5s ease-in-out infinite;
}

@keyframes nose-glow {
    0%, 100% {
        box-shadow: 0 0 12px 4px rgba(255, 0, 0, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px 8px rgba(255, 0, 0, 1);
        transform: scale(1.15);
    }
}

/* Extra dots added for animation (beyond 365) */
.day-dot.christmas-extra {
    pointer-events: none;
}

/* Small screen adjustments */
@media (max-width: 420px) {
    .dots-container.christmas-animation {
        grid-template-columns: repeat(20, 14px) !important;
        gap: 4px;
    }
}

/* ===============================
   NEW YEAR'S DAY ANIMATION
   =============================== */

/* During New Year animation, dots container uses fixed 20-column grid */
.dots-container.newyear-animation {
    grid-template-columns: repeat(20, 18px) !important;
    justify-content: center;
    position: relative;
}

/* Dots during New Year animation get smooth transitions */
.dots-container.newyear-animation .day-dot {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Faster transitions during animation phase */
.dots-container.newyear-scrolling .day-dot {
    transition: transform 0.1s ease-out,
                background-color 0.15s ease,
                box-shadow 0.15s ease;
}

/* New Year's ball - shiny silver/white like the Times Square crystal ball */
.day-dot.newyear-ball {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 30%, #c0c0c0 50%, #e8e8e8 70%, #ffffff 100%) !important;
    box-shadow:
        0 0 15px 5px rgba(255, 255, 255, 0.8),
        0 0 30px 10px rgba(200, 200, 255, 0.4),
        inset 0 0 8px rgba(255, 255, 255, 0.9) !important;
}

/* Glowing ball effect - intense sparkle animation */
.day-dot.newyear-ball.glowing {
    animation: ball-sparkle 0.4s ease-in-out infinite;
}

@keyframes ball-sparkle {
    0%, 100% {
        box-shadow:
            0 0 15px 5px rgba(255, 255, 255, 0.8),
            0 0 30px 10px rgba(200, 200, 255, 0.4),
            inset 0 0 8px rgba(255, 255, 255, 0.9);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 20px 8px rgba(255, 255, 255, 1),
            0 0 40px 15px rgba(200, 200, 255, 0.6),
            inset 0 0 12px rgba(255, 255, 255, 1);
        transform: scale(1.05);
    }
}

/* Crystal panel effect - some dots shimmer more intensely */
.day-dot.newyear-crystal {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0ff 40%, #e0e0ff 60%, #ffffff 100%) !important;
    animation: crystal-shimmer 0.3s ease-in-out infinite !important;
}

@keyframes crystal-shimmer {
    0%, 100% {
        box-shadow:
            0 0 20px 8px rgba(255, 255, 255, 1),
            0 0 40px 15px rgba(180, 180, 255, 0.7),
            inset 0 0 10px rgba(255, 255, 255, 1);
        transform: scale(1.1);
    }
    50% {
        box-shadow:
            0 0 25px 12px rgba(255, 255, 255, 1),
            0 0 50px 20px rgba(200, 200, 255, 0.8),
            inset 0 0 15px rgba(255, 255, 255, 1);
        transform: scale(1.15);
    }
}

/* Countdown numbers - bright gold/yellow */
.day-dot.newyear-countdown {
    background-color: #FFD700 !important;
    box-shadow:
        0 0 15px 5px rgba(255, 215, 0, 0.8),
        0 0 30px 10px rgba(255, 215, 0, 0.4) !important;
}

.day-dot.newyear-countdown.glowing {
    animation: countdown-pulse 0.5s ease-in-out infinite;
}

@keyframes countdown-pulse {
    0%, 100% {
        box-shadow:
            0 0 15px 5px rgba(255, 215, 0, 0.8),
            0 0 30px 10px rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 25px 10px rgba(255, 215, 0, 1),
            0 0 45px 15px rgba(255, 215, 0, 0.6);
        transform: scale(1.1);
    }
}

/* Ball shrinking animation */
.day-dot.newyear-shrinking {
    animation: ball-shrink 0.5s ease-in forwards !important;
}

@keyframes ball-shrink {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Kiss/lips - romantic red/pink base styling */
.day-dot.newyear-kiss {
    background: linear-gradient(135deg, #ff1744 0%, #e91e63 50%, #ff4081 100%) !important;
    box-shadow:
        0 0 12px 4px rgba(233, 30, 99, 0.7),
        0 0 25px 8px rgba(255, 23, 68, 0.4) !important;
}

/* Upper lip - slightly darker red */
.day-dot.newyear-upper-lip {
    background: linear-gradient(180deg, #d50032 0%, #e91e63 60%, #ff4081 100%) !important;
}

/* Lower lip - slightly pinker */
.day-dot.newyear-lower-lip {
    background: linear-gradient(0deg, #ff4081 0%, #e91e63 60%, #d50032 100%) !important;
}

.day-dot.newyear-kiss.glowing {
    animation: kiss-glow 0.8s ease-in-out infinite;
}

@keyframes kiss-glow {
    0%, 100% {
        box-shadow:
            0 0 12px 4px rgba(233, 30, 99, 0.7),
            0 0 25px 8px rgba(255, 23, 68, 0.4);
    }
    50% {
        box-shadow:
            0 0 18px 8px rgba(233, 30, 99, 0.9),
            0 0 35px 12px rgba(255, 23, 68, 0.6);
    }
}

/* Kiss growing animation */
.day-dot.newyear-growing {
    animation: kiss-grow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes kiss-grow {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Extra dots added for animation (beyond 365) */
.day-dot.newyear-extra {
    pointer-events: none;
}

/* Small screen adjustments */
@media (max-width: 420px) {
    .dots-container.newyear-animation {
        grid-template-columns: repeat(20, 14px) !important;
        gap: 4px;
    }
}

/* ===============================
   STREAK ANIMATION
   =============================== */

/* During streak animation, dots container uses fixed 20-column grid */
.dots-container.streak-animation {
    grid-template-columns: repeat(20, 18px) !important;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

/* Dots during streak animation get smooth transitions */
.dots-container.streak-animation .day-dot {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Faster transitions during scroll phase */
.dots-container.streak-scrolling .day-dot {
    transition: transform 0.1s ease-out,
                background-color 0.15s ease,
                box-shadow 0.15s ease;
}

/* Streak text styling - uses CSS custom properties for tier colors */
.day-dot.streak-text {
    background-color: var(--streak-color, #B22222) !important;
}

/* Streak glow effect */
.day-dot.streak-text.streak-glowing {
    box-shadow: 0 0 8px 3px var(--streak-glow, rgba(178, 34, 34, 0.6)) !important;
}

/* Streak breathing animation */
.day-dot.streak-text.streak-breathing {
    animation: streak-breathe var(--breathe-duration, 3s) ease-in-out infinite;
    animation-delay: var(--breathe-delay, 0s);
}

@keyframes streak-breathe {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(0.97);
    }
}

/* Fade out animation for click-to-dismiss */
.day-dot.streak-fade-out {
    opacity: 0 !important;
    transform: scale(0.8) !important;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out !important;
}

/* Extra dots added for animation (beyond 365) */
.day-dot.streak-extra {
    pointer-events: none;
}

/* Small screen adjustments */
@media (max-width: 420px) {
    .dots-container.streak-animation {
        grid-template-columns: repeat(20, 14px) !important;
        gap: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .day-dot.streak-text.streak-breathing {
        animation: none !important;
    }

    .dots-container.streak-animation .day-dot,
    .dots-container.streak-scrolling .day-dot {
        transition: none !important;
    }
}

/* ===== EMBEDDED MODE STYLES ===== */
/* Applied when app is viewed in iframe on website */

html.embedded-mode header,
body.embedded-mode header {
    display: none !important;
}

html.embedded-mode .bottom-nav,
body.embedded-mode .bottom-nav {
    background-color: var(--bg-color) !important;
}

/* Fixed 19-column grid for a near-perfect square (19x19=361, +4 extra) */
html.embedded-mode .dots-container,
body.embedded-mode .dots-container {
    grid-template-columns: repeat(19, 1fr);
    gap: 4px;
    max-width: 480px;
    margin: 0 auto;
}

/* Slightly smaller dots to fit 19x19 grid on mobile */
html.embedded-mode .day-dot,
body.embedded-mode .day-dot {
    width: 17px;
    height: 17px;
    min-width: 17px;
    min-height: 17px;
}
