:root {
    --color-bg-dark: #192538;
    --color-bg-darker: #09101b;
    --color-text-primary: #80aff9;
    --color-text-accent: #e1bc4b;
    --color-full-moon: #e1bc4b;
    --color-waxing-waning: #c2b37f;
    --color-quarter: #b6b195;
    --color-crescent: #9bb1cd;
    --color-border: #80aff933;
    --color-border-accent: #e1bc4b33;
}

html {
    background-color: #fff;
    font-size: 16px;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    min-width: 300px;
    overflow-x: hidden;
    overflow-y: scroll;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;

    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}
body {
    background-color: var(--color-bg-dark);
    background-image: linear-gradient(to right, #0005 0%, var(--color-bg-dark) 50%, #0005 100%);
    color: var(--color-text-primary);
    font-family: BlinkMacSystemFont,-apple-system,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 400;
    line-height: 1.5;
    min-height: 100vh;
}
a {
    color: inherit;
}
button {
    border: none;
    margin: 0;
    width: auto;
    overflow: visible;
    background: transparent;
    color: inherit;
    line-height: normal;
    -webkit-font-smoothing: inherit;
    -moz-osx-font-smoothing: inherit;
    -webkit-appearance: none;

    cursor: pointer;
    background: var(--color-bg-darker);
    border-radius: 3px;
    padding: 2px 10px;
    line-height: 1.5;
    font-size: 0.8em;
}
    button:hover,
a:hover {
    color: var(--color-text-accent);
}
input {
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-darker);
    color: var(--color-text-primary);
    padding: 2px 15px;
    line-height: 1.5;
    font-size: 0.8em;
}
.nav-year {
    font-weight: bold;
}
.mono {
    font-family: monospace;
}
    header,
footer {
    background-color: var(--color-bg-dark);
    display: flex;
    justify-content: space-between;
    padding: 0.5em;
}
@media screen and (max-width: 600px) {
    header {
        align-items: center;
    }
    header, footer {
        flex-direction: column;
    }
}

.error {
    font-family: monospace;
    padding: 1em;
}
.loader {
    font-family: monospace;
}
.loader .spinner {
    display: inline-block;
    animation-name: spin;
    animation-duration: 2000ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}
.loading {
    padding: 1em;
    font-size: 1.5em;
    text-transform: uppercase;
    letter-spacing: 12px;
}
.loading .spinner {
    letter-spacing: 0;
    display: inline-block;
    position: relative;
    width: 25px;
    height: 36px;
    margin: 10px 20px;
}
.loading .spinner:after {
    content: "🌝";
    animation-name: spin;
    animation-duration: 4000ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    font-size: 12px;
    position: absolute;
    left: -17px;
    width: 60px;
    height: 60px;
    top: -12px;
}
@keyframes spin {
    from {
        transform:rotate(0deg);
    }
    to {
        transform:rotate(360deg);
    }
}
.calendar {
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
.cycle {
    display: grid;
    grid-template-columns: repeat(31,1fr);
}
.day {
    border-right: 1px solid var(--color-border);
    cursor: pointer;
    padding: 5px 0;
    text-align: center;
    position: relative;
    transition: all 500ms ease-in;
}
.day:hover {
    background-color: var(--color-bg-darker);
    transition: all 100ms ease-in;
}
.day.active {
    transform: scale(1.5);
    z-index: 1;
    position: relative;
    background-color: var(--color-bg-dark);
    border: 1px solid var(--color-border-accent);
    margin: -1px;
    box-shadow: 1px 4px 8px 2px #0008;
}
.day.active .phase { position: relative; }
.day.active .phase:after {
    position: absolute;
    width: calc( 100% * 1.5 );
    left: calc(50% - (50% * 1.5));
    font-size: 40px;
    bottom: 0;
    line-height: 1;
    transition: font-size 100ms ease-out 100ms;
}
.day.full.active .phase:after                { text-shadow: 0 0 20px #e1bc4baa; }
.day.first-full.active .phase:after,
.day.full-last.active .phase:after           { text-shadow: 0 0 20px #e1bc4b88; }
.day.first.active .phase:after,
.day.last.active .phase:after                { text-shadow: 0 0 20px #e1bc4b44; }
.day.new-first.active .phase:after,
.day.last-new.active .phase:after            { text-shadow: 0 0 20px #e1bc4b22; }
.cycle:first-child .day.active               { transform-origin: top; }
.cycle:first-child .day:first-child.active   { transform-origin: top left; }
.cycle:first-child .day:last-child.active    { transform-origin: top right; }
.day:first-child.active                      { transform-origin: left; }
.day:last-child.active                       { transform-origin: right; }
.cycle:last-child .day.active                { transform-origin: bottom; }
.cycle:last-child .day:first-child.active    { transform-origin: bottom left; }
.cycle:last-child .day:last-child.active     { transform-origin: bottom right; }

.day.active.month-start:before { content: unset; }

.day.not-current-year { opacity: 0.4; }

.day.today .date {
    background-color: var(--color-border);
}

.day.month-start:before {
    content: "";
    height: calc(100% - 10px);
    position: absolute;
    border-left: 1px solid;
    left: 0px;
    opacity: 0.5;
}

.new .phase:after {
    content: "🌑";
}
.new-first .phase:after {
    content: "🌒";
}
.first .phase:after {
    content: "🌓";
}
.first-full .phase:after {
    content: "🌔";
}
.full .phase:after {
    content: "🌕";
}
.full-last .phase:after {
    content: "🌖";
}
.last .phase:after {
    content: "🌗";
}
.last-new .phase:after {
    content: "🌘";
}

.phase {
    height: 1.5em;
}
    .month,
.week {
    font-size: 0.6em;
    text-transform: uppercase;
}
.day.weekday .week {
    font-weight: bold;
}
.date {
    font-weight: bold;
}

.full .month, .full .week, .full .date {
    color: var(--color-full-moon);
}
    .first-full .month, .first-full .date,
.full-last .month, .full-last .date {
    color: var(--color-waxing-waning);
}
    .first .month, .first .week, .first .date,
.last .month, .last .week, .last .date {
    color: var(--color-quarter);
}
    .new-first .month, .new-first .date,
.last-new .month, .last-new .date {
    color: var(--color-crescent);
}

.morning,
.afternoon {
    min-height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.day time {
    font-size: 0.8rem;
    font-family: 'Courier New', Courier, monospace;
}

@media screen and (max-width: 1000px) {
    .cycle {
        grid-template-columns: repeat(5,1fr) !important;
        font-size: 2em;
    }
    .new-first, .first-full, .full-last, .last-new {
        display: none;
    }
}

@media screen and (min-width: 1001px) {
    .new .phase:after,
    .first .phase:after,
    .full .phase:after,
    .last .phase:after {
        font-size: 1.3em;
        line-height: 0.5;
    }
}

@media screen and (min-width: 1500px) {
    .cycle {
        font-size: 1.5em;
    }
}

@media screen and (min-width: 2000px) {
    .cycle {
        font-size: 2em;
    }
}
[v-cloak] {
    display: none;
}