:root {
    --bg-color: #f0f2f5;
    --calendar-bg: #ffffff;
    --text-color: #333;
    --accent-color: #ff4500; /* Reddit orange */
    --shadow: 0 10px 25px rgba(0,0,0,0.1);
    --ring-color: #d1d1d1;
}

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

body {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
}

.calendar-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    perspective: 1000px;
}

.calendar-rings {
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    z-index: 10;
}

.ring {
    width: 20px;
    height: 40px;
    background: linear-gradient(to bottom, #999, #ccc, #999);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.calendar-page {
    background-color: var(--calendar-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transform-origin: top center;
    animation: swingIn 1s ease-out;
    padding-top: 30px; /* Space for rings */
}

@keyframes swingIn {
    0% {
        transform: rotateX(-20deg);
        opacity: 0;
    }
    100% {
        transform: rotateX(0);
        opacity: 1;
    }
}

.calendar-header {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mini Calendar */
.mini-calendar {
    padding: 10px;
    margin-top: 20px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
    font-size: 0.8rem; /* Smaller base font size */
    max-width: 300px; /* Limit width */
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
}

.mini-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    font-size: 0.9rem;
}

.mini-calendar-header button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #888;
    padding: 0 5px;
}

.mini-calendar-header button:hover {
    color: var(--accent-color);
}

.mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px; /* Smaller gap */
    text-align: center;
}

.cal-day-header {
    font-size: 0.7rem;
    color: #999;
    padding-bottom: 2px;
}

.cal-day {
    padding: 4px 0; /* Smaller padding */
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    width: 24px; /* Fixed width for circles */
    height: 24px; /* Fixed height for circles */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.cal-day:hover:not(.disabled):not(.selected) {
    background-color: #e0e0e0;
}

.cal-day.selected {
    background-color: var(--accent-color);
    color: white;
}

.cal-day.today {
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.cal-day.selected.today {
    color: white;
}

.cal-day.disabled {
    color: #ccc;
    cursor: default;
    pointer-events: none;
}

.cal-day.empty {
    cursor: default;
}

.date-display {
    flex-grow: 1;
}

.nav-btn {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #ccc;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
    color: var(--accent-color);
    background-color: rgba(0,0,0,0.05);
    border-color: var(--accent-color);
}

.nav-btn:disabled {
    color: #f0f0f0;
    cursor: default;
}

.month {
    font-size: 1.2rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 2px;
}

.day {
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    line-height: 1;
    color: var(--text-color);
    margin: 10px 0;
}

.weekday {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: bold;
}

.calendar-content {
    padding: 20px;
    text-align: center;
}

.media-container {
    width: 100%;
    min-height: 300px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.media-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.media-container img, .media-container video {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.media-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.meta-info {
    font-size: 0.9rem;
    color: #777;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.reddit-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.reddit-link:hover {
    text-decoration: underline;
}

.socials-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.socials-container h3 {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.socials-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.social-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f0f2f5;
    color: #555;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: background-color 0.2s, color 0.2s;
}

.social-link:hover {
    background-color: var(--accent-color);
    color: white;
}

.loading {
    padding: 40px;
    font-style: italic;
    color: #888;
}

.hidden {
    display: none;
}
/* Add styles for the embedded author link */
#media-author a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

#media-author a:hover {
    text-decoration: underline;
}
/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: #333;
}

.modal-content p {
    margin-bottom: 1rem;
    color: #666;
}

.dob-container {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

.dob-container select {
    padding: 10px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    flex: 1;
    font-family: inherit;
    background-color: white;
}

#verify-age-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

#verify-age-btn:hover {
    background: #e03e00;
}

.error-msg {
    color: red;
    margin-top: 10px;
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}
/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 20px 0;
    margin-bottom: -10px;
}

.toggle-label {
    margin-right: 10px;
    font-size: 0.9rem;
    color: #666;
    font-weight: bold;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Disabled state */
input:disabled + .slider {
    background-color: #e6e6e6;
    cursor: not-allowed;
}

/* Seasonal Themes */
.snowflake, .falling-item {
    position: absolute;
    top: -50px;
    color: #fff;
    user-select: none;
    pointer-events: none;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.snowflake {
    color: #aaddff;
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
    }
}

#new-year-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: rainbow 5s linear infinite;
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Valentine's Day Heart on Calendar */
.cal-day.valentine-heart {
    position: relative;
}
.cal-day.valentine-heart::after {
    content: '❤️';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.8rem;
}

/* Halloween Pumpkin on Calendar */
.cal-day.halloween-pumpkin {
    position: relative;
}
.cal-day.halloween-pumpkin::after {
    content: '🎃';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.8rem;
}
    cursor: not-allowed;
}

input:disabled + .slider:before {
    background-color: #999;
}
