/*Start Screen*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.header {
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 40px;
    height: 40px;
    background: conic-gradient(from 0deg, #4CAF50, #2196F3, #9C27B0, #F44336, #FF9800, #4CAF50);
    border-radius: 50%;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
}

.menu-icon {
    width: 24px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.menu-icon span {
    width: 100%;
    height: 2px;
    background-color: #333;
    border-radius: 2px;
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    color: #666;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.game-logo {
    width: 120px;
    height: 120px;
    background: conic-gradient(from 0deg, #4CAF50, #2196F3, #9C27B0, #F44336, #FF9800, #4CAF50);
    border-radius: 50%;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.game-logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    background-color: #f5f5f5;
    border-radius: 50%;
}

h1 {
    font-size: clamp(48px, 10vw, 64px);
    color: #5a5a5a;
    font-weight: 700;
    margin-bottom: 20px;
}

.subtitle {
    font-size: clamp(18px, 4vw, 20px);
    color: #888;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.5;
}

.play-button {
    background-color: #29B6F6;
    color: white;
    border: none;
    padding: 14px 60px;
    font-size: 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 10px rgba(41, 182, 246, 0.3);
}

.play-button:hover {
    background-color: #039BE5;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
    width: 100%;
    margin-top: auto;
}

.footer-date {
    margin-bottom: 8px;
}

.footer-credits {
    color: #aaa;
}

/*Game Screen*/

.game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 20px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    grid-template-rows: repeat(3, 1fr); 
    gap: 8px;
    width: min(250px, 90vw);
    height: min(250px, 90vw);
    margin-bottom: 20px;
}

.grid-item {
    background-color: #f5f5f5;
    border: 2px solid #D9D9D9;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
}

/*Slider Styles*/

.sliders-container {
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.slider-wrapper {
    flex: 1;
    position: relative;
}

.color-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    background: #ddd;
}

.color-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.color-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.color-slider.red {
    background: linear-gradient(to right, #EF5350 0%, #EF5350 0%, #ddd 0%, #ddd 100%);
}

.color-slider.red::-webkit-slider-thumb {
    background-color: #EF5350;
}

.color-slider.red::-moz-range-thumb {
    background-color: #EF5350;
}

.color-slider.green {
    background: linear-gradient(to right, #4CAF50 0%, #4CAF50 0%, #ddd 0%, #ddd 100%);
}

.color-slider.green::-webkit-slider-thumb {
    background-color: #4CAF50;
}

.color-slider.green::-moz-range-thumb {
    background-color: #4CAF50;
}

.color-slider.blue {
    background: linear-gradient(to right, #2196F3 0%, #2196F3 0%, #ddd 0%, #ddd 100%);
}

.color-slider.blue::-webkit-slider-thumb {
    background-color: #2196F3;
}

.color-slider.blue::-moz-range-thumb {
    background-color: #2196F3;
}

.slider-value {
    min-width: 50px;
    text-align: center;
    padding: 6px 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    color: #666;
    background-color: #f5f5f5;
}

.enter-button {
    background-color: #9e9e9e;
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.enter-button:hover {
    background-color: #757575;
}

/* Snackbar Styles */
#snackbar {
    visibility: hidden;
    min-width: 125px;
    margin-left: -62.5px;
    background-color: #4A4A4A;
    color: #FFFFFF;
    text-align: center;
    border-radius: 15px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    top: 280px;
}

#snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
    from {top: 280px; opacity: 0;}
    to {top: 280px; opacity: 1;}
}

@keyframes fadein {
    from {top: 280px; opacity: 0;}
    to {top: 280px; opacity: 1;}
}

@-webkit-keyframes fadeout {
    from {top: 280px; opacity: 1;}
    to {top: 280px; opacity: 0;}
}

@keyframes fadeout {
    from {top: 280px; opacity: 1;}
    to {top: 280px; opacity: 0;}
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.custom-modal {
    background-color: white;
    border-radius: 8px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
}

.form-control:focus {
    outline: none;
    border-color: #29B6F6;
    box-shadow: 0 0 0 0.2rem rgba(41, 182, 246, 0.1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: clamp(32px, 8vw, 48px);
    color: #636363;
}

.modal-subtitle {
    margin-bottom: 30px;
    font-size: clamp(16px, 4vw, 20px);
    color: #888;
    text-align: center;
    line-height: 1.5;
}

.modal-button {
    padding: 14px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.create-account-btn {
    background-color: #636363;
    color: #FFFFFF;
    width: 60%;
}

.create-account-btn:hover {
    background-color: #555;
}

.login-link {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.login-link:hover {
    color: #333;
}

.share-score-btn {
    background-color: #00B356;
    color: #FFFFFF;
    width: 45%;
}

.share-score-btn:hover {
    background-color: #00B248;
}

.past-colors-btn {
    background-color: #35B2EA;
    color: #FFFFFF;
    width: 45%;
}

.past-colors-btn:hover {
    background-color: #2ba8e2;
}

.modal-divider {
    border: none;
    border-top: 1px solid #D9D9D9;
    margin: 30px 0;
}

.other-versions-title {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

.version-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.version-link:hover {
    color: #333;
}

.color-badges {
    display: flex;
    gap: 3px;
}

.color-badge {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.badge-r { background-color: #EB5678; }
.badge-g { background-color: #3ED8AF; }
.badge-b { background-color: #35B2EA; }
.badge-c { background-color: #2ABDC5; }
.badge-m { background-color: #EB5678; }
.badge-y { background-color: #F9D400; }
.badge-k { background-color: #5A6B6C; }

.color-badges.grid {
    display: grid;
    grid-template-columns: repeat(2, 12px);
    grid-template-rows: repeat(2, 12px);
    gap: 2px;
    width: 26px;
    height: 26px;
}

.color-badges.grid .color-badge {
    width: 12px;
    height: 12px;
}

.badge-pink { background-color: #EB5678; }
.badge-cyan { background-color: #3ED8AF; }
.badge-blue { background-color: #35B2EA; }
.badge-yellow { background-color: #F9D400; }

/* Privacy Policy Styles */
.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    min-height: calc(100vh - 80px);
}

.privacy-title {
    font-size: clamp(24px, 6vw, 32px);
    color: #5a5a5a;
    font-weight: 500;
    margin-bottom: 10px;
}

.privacy-updated {
    color: #4A4A4A;
    font-size: 14px;
    margin-bottom: 25px;
}

.privacy-intro {
    color: #4A4A4A;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
    margin-top: 25px;
}

.privacy-section-title {
    font-size: 16px;
    color: #4A4A4A;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

.privacy-subsection-title {
    font-size: 14px;
    color: #4A4A4A;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
}

.privacy-text {
    color: #4A4A4A;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.privacy-list {
    color: #4A4A4A;
    font-size: 14px;
    line-height: 1.8;
    margin-left: 20px;
    margin-bottom: 12px;
}

.privacy-list li {
    margin-bottom: 5px;
}

/* Switch toggle styling */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #bdbdbd;
    border-radius: 34px;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .slider {
    background: #00B356; /* green like screenshot */
}

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

.settings-row {
    display: flex;
    justify-content: space-between;
}

/*Past Colors*/

.calendar-wrapper {
            max-width: 500px;
            margin: 0 auto;
            position: relative;
            justify-items: center;
        }

        .calendar-header {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 30px;
            margin-bottom: 20px;
            padding: 15px 0;
        }

        .calendar-nav {
            width: 30px;
            height: 30px;
            border: 2px solid #ddd;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            background: white;
            transition: all 0.3s ease;
        }

        .calendar-nav:hover {
            background: #f5f5f5;
            border-color: #999;
        }

        .calendar-month {
            font-size: 18px;
            color: #5a5a5a;
            font-weight: 500;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 8px;
            margin-bottom: 30px;
            position: relative;
            justify-items: center;
            row-gap: 25px;
        }

        .calendar-grid::after {
            content: '';
            position: absolute;
            bottom: -30px;
            left: 0;
            right: 0;
            height: 80%;
            background: linear-gradient(to bottom, rgba(245, 245, 245, 0) 0%, rgba(245, 245, 245, 0.8) 40%, rgba(245, 245, 245, 1) 100%);
            pointer-events: none;
            z-index: 1;
            display: none;  /* Hidden by default */
        }

        .calendar-grid.show-gradient::after {
            display: block;  /* Show gradient */
        }

        .calendar-day-header {
            text-align: center;
            font-size: 14px;
            color: #999;
            font-weight: 500;
            padding: 10px 0;
        }

        .calendar-day {
            aspect-ratio: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            cursor: pointer;
            transition: transform 0.2s ease;
        }

        .calendar-day:hover {
            transform: scale(1.05);
        }

        .calendar-day-number {
            font-size: 12px;
            color: #666;
            margin-top: 5px;
        }

        .account-prompt {
            text-align: center;
            max-width: 400px;
            margin: 0 auto;
            padding: 0 20px;
            position: relative;
            z-index: 2;
            bottom: 60px;
        }

        .account-prompt-title {
            font-size: 18px;
            color: #5a5a5a;
            line-height: 1.6;
            margin-bottom: 25px;
        }

        .account-button {
            background-color: #636363;
            color: white;
            border: none;
            padding: 12px 40px;
            font-size: 16px;
            border-radius: 25px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            margin-bottom: 15px;
        }

        .account-button:hover {
            background-color: #555;
        }

        .calendar-day.empty {
            background: transparent;
            cursor: default;
        }

        .calendar-day.empty:hover {
            transform: none;
        }

        .calendar-day.faded {
            opacity: 0.4;
        }

.calendar-blocks {
    background-color: #ad1010;
    width: 30px;
    height: 30px;
    justify-self: center;
}
.calendar-text {
    position: relative;
    top: 33px;
}
/* Media Queries */

/* Tablets and below */
@media screen and (max-width: 768px) {
    .header-icons {
        gap: 15px;
    }
    
    .icon {
        width: 20px;
        height: 20px;
    }
    
    .game-content {
        padding: 60px 15px;
    }
    
    .grid-container {
        width: min(220px, 85vw);
        height: min(220px, 85vw);
    }
    
    .custom-modal {
        padding: 30px 20px;
    }
}

/* Large Smartphones and below */
@media screen and (max-width: 600px) {
    .logo {
        display: none;
    }
    
    .game-logo {
        width: 100px;
        height: 100px;
    }
    
    .game-logo::after {
        width: 45px;
        height: 45px;
    }
    
    .sliders-container {
        max-width: 100%;
    }
    
    .slider-group {
        gap: 10px;
    }
    
    .slider-value {
        min-width: 45px;
        padding: 4px 8px;
        font-size: 13px;
    }
}

/* Small Smartphones */
@media screen and (max-width: 376px) {
    .main-content {
        padding: 30px 15px;
    }
    
    .game-content {
        padding: 20px 10px;
    }
    
    .grid-container {
        width: min(200px, 90vw);
        height: min(200px, 90vw);
        gap: 6px;
    }

    .logo {
        display: none;
    }
}