:root {
    --bg-color: #f8f9fa;
    --text-color: #333;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    
    /* Group 1: Warm & Bright */
    --color-1: #FAD0C4;
    --color-2: #F08080;
    --color-3: #E3C565;
    
    /* Group 2: Natural & Earthy */
    --color-4: #B2AC88;
    --color-5: #8A9A5B;
    --color-6: #4A5D4E;
    
    /* Group 3: Cold & Airy */
    --color-7: #A3D2CA;
    --color-8: #89CFF0;
    --color-9: #5D737E;
    
    /* Group 4: Soulful & Deep */
    --color-10: #C08081;
    --color-11: #B39EB5;
    --color-12: #5D3A5D;
    
    /* Group 5: Neutral & Minimal */
    --color-13: #F5F5DC;
    --color-14: #D2B48C;
    --color-15: #B2BEB5;
    
    /* Group 6: Deep & Vibrant */
    --color-16: #CD5C5C;
    --color-17: #3F4E6E;
    --color-18: #DCD0FF;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    background: var(--bg-color);
}

.hidden {
    transform: translateY(100%);
}

.active {
    transform: translateY(0);
}

/* Glassmorphism Container */
.container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-weight: bold;
}

.grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 20px;
}

.day-cell {
    aspect-ratio: 1;
    background: #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s;
}

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

.day-cell.filled {
    border: 1px solid rgba(0,0,0,0.05);
}

.today {
    border: 2px solid #333;
}

.day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 5px;
    text-align: center;
    font-size: 12px;
    color: #888;
    font-weight: 600;
}

.day-cell {
    position: relative; /* Ensure absolute positioning works for children */
}

.day-number {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 10px;
    color: #aaa;
}

.day-cell.filled .day-number {
    color: rgba(0,0,0,0.4); 
}

/* Ritual Screen */
.ritual-content {
    background: #ffffff; /* Fully opaque background */
    border-radius: 20px 20px 0 0;
    padding: 20px;
    min-height: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

#ritual-screen {
    background: none; 
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.color-option {
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-option.selected {
    border-color: #333;
    transform: scale(1.05);
}

textarea {
    width: 100%;
    height: 100px;
    border: none;
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
    padding: 10px;
    font-size: 16px;
    resize: none;
    margin-bottom: 20px;
}

.slider-container {
    margin: 20px 0;
}

input[type="range"] {
    width: 100%;
}

.btn-primary {
    background: #333;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    width: 100%;
    font-size: 16px;
    cursor: pointer;
    margin-top: auto;
}

/* Artifact Screen */
.artifact-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    margin-top: 20px;
}

.art-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background: #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.tags {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.tag {
    background: #eee;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s;
    z-index: 100;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.glass-modal {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    width: 80%;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(1);
    transition: transform 0.3s;
}

.modal-overlay.hidden .glass-modal {
    transform: scale(0.9);
}

.app-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
}

.app-title {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
}

.icon-btn {
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.icon-btn:hover {
    opacity: 1;
}
