:root {
    --pixel-bg: #2d1b2e;
    --pixel-fg: #fff0f5;
    --pixel-accent: #b050d2;
    --pixel-border: #fff0f5;
    --pixel-dim: #574b68;
    --moon-color: #fdfd96;
    --period-color: #ff6b6b;
    --ovulation-color: #4ecdc4;
}

.pixel-art-container {
    font-family: 'Press Start 2P', cursive;
    background-color: var(--pixel-bg);
    color: var(--pixel-fg);
    padding: 20px;
    border: 4px solid var(--pixel-border);
    max-width: 800px;
    margin: 20px auto;
    image-rendering: pixelated;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.5);
}

.ms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px dashed var(--pixel-dim);
    padding-bottom: 10px;
}

.pixel-font {
    font-size: 14px;
    text-transform: uppercase;
    margin: 0;
}

.ms-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pixel-btn {
    background: var(--pixel-bg);
    border: 2px solid var(--pixel-border);
    color: var(--pixel-fg);
    font-family: 'Press Start 2P', cursive;
    padding: 10px 15px;
    cursor: pointer;
    box-shadow: 4px 4px 0px var(--pixel-dim);
    transition: transform 0.1s;
    white-space: nowrap;
    /* Prevent text wrapping on mobile */
    min-width: fit-content;
}

.pixel-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--pixel-dim);
}

.pixel-btn.primary {
    background: var(--pixel-accent);
    color: #fff;
}

/* Calendar Grid */
.ms-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-header {
    text-align: center;
    font-size: 10px;
    color: var(--pixel-dim);
    padding-bottom: 5px;
}

.day-cell {
    border: 2px solid var(--pixel-dim);
    min-height: 80px;
    position: relative;
    padding: 5px;
    cursor: pointer;
    background: #362538;
}

.day-cell:hover {
    border-color: var(--pixel-accent);
}

.day-number {
    font-size: 10px;
    display: block;
    margin-bottom: 5px;
}

/* Indicators */
.indicator {
    width: 8px;
    height: 8px;
    display: inline-block;
    margin-right: 2px;
}

.indicator.period {
    background-color: var(--period-color);
}

.indicator.period-end {
    background-color: var(--period-color);
    border: 1px solid #fff;
    box-sizing: border-box;
}

.indicator.ovulation {
    background-color: var(--ovulation-color);
}

.indicator.symptom.cramps {
    background-color: #b33939;
    /* Dark Red - Distinct from bright Period Red */
}

/* Red */
.indicator.symptom.headache {
    background-color: #ff9f43;
}

/* Orange */
.indicator.symptom.energy_low {
    background-color: #54a0ff;
}

/* Blue */
.indicator.symptom.energy_high {
    background-color: #feca57;
}

/* Yellow */
.indicator.symptom.moody {
    background-color: #5f27cd;
}

/* Purple */
.indicator.symptom.anxiety {
    background-color: #6ab04c;
    /* Acid Green - Distinct from Cyan Ovulation */
}

/* Teal */

.indicator.symptom.bloating {
    background-color: #7efff5;
}

.indicator.symptom.hormonal_acne {
    background-color: #ffcccc;
}

.indicator.symptom.insomnia {
    background-color: #9c88ff;
}


.moon-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 16px;
}

/* Modal */
.hidden {
    display: none !important;
}

.ms-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.ms-modal-content {
    background: var(--pixel-bg);
    border: 4px solid var(--pixel-border);
    padding: 20px;
    padding: 20px;
    width: min(90%, 400px);
    /* More flexible width */
    box-shadow: 10px 10px 0px #000;
}

.popup-close {
    float: right;
    cursor: pointer;
}

.ms-form-group {
    margin-bottom: 15px;
}

.symptom-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.symptom-tags label {
    font-size: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}

.btn-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    /* Allow wrapping on tiny screens */
}

.small {
    font-size: 10px;
}