@keyframes pulseHighlight {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* Animations */
@keyframes popReveal {
    0% {
        transform: scale(0.85);
        opacity: 0.5;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
    }
    60% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 2px 8px rgba(99, 126, 206, 0.6);
    }
}

@keyframes snowFall {
    0% {
        background-position: 0 0, 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 0 100%;
    }
}

.number-display.reveal {
    animation: pulseHighlight 0.5s ease-out;
}

:root {
    --color-page-bg: #ffffff;
    --color-page-text: #000000;
    --color-primary: rgb(42, 87, 71);
    --color-primary-light: rgba(79, 106, 186, 1);
    --color-accent: rgba(99, 126, 206, 1);
    --color-glass-base: rgba(255, 255, 255, 0.35);
    --color-glass-strong: rgba(255, 255, 255, 0.45);
    --color-glass-panel: rgba(255, 255, 255, 0.18);
    --radius-card: 10px;
    --radius-display: 28px;
    --radius-summary: 18px;
    --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.18);
    --shadow-strong: 0 25px 60px rgba(0, 0, 0, 0.15);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    background: url('/images/bg1.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--color-page-text);
    overflow: hidden;
}



body::before {
    content: '';
    position: fixed;
    inset: 0;
    /* Use a simple snowflake pattern image */
    background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='1' fill='white' opacity='0.6'/%3E%3Ccircle cx='30' cy='30' r='0.8' fill='white' opacity='0.5'/%3E%3Ccircle cx='50' cy='50' r='1.2' fill='white' opacity='0.7'/%3E%3Ccircle cx='70' cy='70' r='0.9' fill='white' opacity='0.4'/%3E%3Ccircle cx='90' cy='90' r='1' fill='white' opacity='0.6'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    animation: snowFall 40s linear infinite;
    opacity: 0.4;
    z-index: 1;
    pointer-events: none;
}

.app-shell {
    display: flex;
    width: 100%;
    height: 100%;
}

.left-column, .right-column {
    padding: 20px;
    padding-top: 100px;
    padding-bottom: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.left-column {
    width: 75%;
    left: 12.5%;
    align-items: center;
    position: relative;
    background: transparent;
    overflow: hidden;
}

/* REMOVED: left-column::before (the white opaque overlay) */

.left-column::after {
    content: '';
    position: absolute;
    inset: 0;
    /*background-image:*/
    /*    radial-gradient(4px 4px at 20px 30px, rgba(255, 255, 255, 0.9), transparent),*/
    /*    radial-gradient(4px 4px at 80px 120px, rgba(255, 255, 255, 0.8), transparent),*/
    /*    radial-gradient(6px 6px at 150px 60px, rgba(255, 255, 255, 0.7), transparent),*/
    /*    radial-gradient(4px 4px at 250px 160px, rgba(255, 255, 255, 0.75), transparent);*/
    /*background-size: 200px 200px;*/
    /*animation: snowFall 18s linear infinite;*/
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}

.left-column > * {
    position: relative;
    z-index: 2;
}



.logo {
    width: 196px;
    padding-bottom: 0px;
}

.number-display {
    font-size: 320px;
    font-weight: bold;
    color: #ffffff;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(85%, 600px);
    min-height: 250px;
    max-height: 350px;
    background: transparent;
    box-shadow: none;
    text-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    margin-bottom: 15px;
}

.number-display.reveal {
    animation: pulseHighlight 0.5s ease-out;
}


.btn {
 position: relative;
 display: inline-block;
 cursor: pointer;
 outline: none;
 border: 0;
 vertical-align: middle;
 text-decoration: none;
 font-family: inherit;
 font-size: 15px;
}

.generate-btn {
    font-weight: 600;
    color: #2B3822; /* Dark green text instead of brown */
    text-transform: uppercase;
    padding: 1.25em 2em;
    background: #F0FFF5; /* Light mint green */
    border: 2px solid #7AA97A; /* Sage green border */
    border-radius: 0.75em;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transition: background 100ms cubic-bezier(0, 0, 0.58, 1), -webkit-transform 100ms cubic-bezier(0, 0, 0.58, 1);
    transition: transform 100ms cubic-bezier(0, 0, 0.58, 1), background 100ms cubic-bezier(0, 0, 0.58, 1), -webkit-transform 100ms cubic-bezier(0, 0, 0.58, 1);
}

.generate-btn::before {
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #C4F9D9; /* Light mint green for 3D effect */
    border-radius: inherit;
    -webkit-box-shadow: 0 0 0 2px #7AA97A, 0 0.625em 0 0 #E3FFE8; /* Green shadow */
    box-shadow: 0 0 0 2px #7AA97A, 0 0.625em 0 0 rgba(227, 255, 232, 0); /* With opacity */
    -webkit-transform: translate3d(0, 0.75em, -1em);
    transform: translate3d(0, 0.75em, -1em);
    transition: transform 100ms cubic-bezier(0, 0, 0.58, 1), box-shadow 100ms cubic-bezier(0, 0, 0.58, 1), -webkit-transform 100ms cubic-bezier(0, 0, 0.58, 1), -webkit-box-shadow 100ms cubic-bezier(0, 0, 0.58, 1);
}

.generate-btn:hover {
    background: #E9FFF0; /* Slightly darker mint on hover */
    -webkit-transform: translate(0, 0.25em);
    transform: translate(0, 0.25em);
}

.generate-btn:hover::before {
    -webkit-box-shadow: 0 0 0 2px #7AA97A, 0 0.5em 0 0 #E3FFE8;
    box-shadow: 0 0 0 2px #7AA97A, 0 0.5em 0 0 rgba(227, 255, 232, 0);
    -webkit-transform: translate3d(0, 0.5em, -1em);
    transform: translate3d(0, 0.5em, -1em);
}

.generate-btn:active {
    background: #E9FFF0;
    -webkit-transform: translate(0em, 0.75em);
    transform: translate(0em, 0.75em);
}

.generate-btn:active::before {
    -webkit-box-shadow: 0 0 0 2px #7AA97A, 0 0 #E3FFE8;
    box-shadow: 0 0 0 2px #7AA97A, 0 0 #E3FFE8;
    -webkit-transform: translate3d(0, 0, -1em);
    transform: translate3d(0, 0, -1em);
}


/*Perspective effect*/


@media screen and (min-width: 768px) {
    .right-column {
            transform: perspective(500px) rotateY(-10deg);
            transition: transform 1s ease 0s;
    }
    .right-column:hover {
            transform: perspective(1500px) rotateY(0deg);
            transition: transform 0.4s ease 0s;
    }
    
}


/*----------------------*/

.right-column {
    width: 25%;
    background: transparent;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    height: 100vh;
    text-align: center;
    box-sizing: border-box;
    gap: 24px;
}




.clear-btn {
    position: relative;
    /*margin-top: 20px;*/
    font-weight: 600;
    color: #7A2E2E; /* Soft dark red text */
    text-transform: uppercase;
    padding: 1.25em 2em;
    background: #FFF5F5; /* Very light red / blush */
    border: 2px solid #E7A1A1; /* Muted coral border */
    border-radius: 0.75em;
    transform-style: preserve-3d;
    transition:
        background 100ms cubic-bezier(0, 0, 0.58, 1),
        transform 100ms cubic-bezier(0, 0, 0.58, 1);
}

.clear-btn::before {
    position: absolute;
    content: '';
    inset: 0;
    background: #FFE3E3; /* Inner depth layer */
    border-radius: inherit;
    box-shadow:
        0 0 0 2px #E7A1A1,
        0 0.625em 0 0 rgba(255, 200, 200, 0);
    transform: translate3d(0, 0.75em, -1em);
    transition:
        transform 100ms cubic-bezier(0, 0, 0.58, 1),
        box-shadow 100ms cubic-bezier(0, 0, 0.58, 1);
}

/* Hover */
.clear-btn:hover {
    background: #FFECEC;
    transform: translate(0, 0.25em);
}

.clear-btn:hover::before {
    box-shadow:
        0 0 0 2px #E7A1A1,
        0 0.5em 0 0 rgba(255, 200, 200, 0);
    transform: translate3d(0, 0.5em, -1em);
}

/* Active / Pressed */
.clear-btn:active {
    background: #FFECEC;
    transform: translate(0, 0.75em);
}

.clear-btn:active::before {
    box-shadow:
        0 0 0 2px #E7A1A1,
        0 0 rgba(255, 200, 200, 0);
    transform: translate3d(0, 0, -1em);
}



.generate-btn:focus,
.clear-btn:focus {
    outline: none;
}

.generate-btn:focus:not(:active),
.clear-btn:focus:not(:active) {
    transform: translate(0, 0); /* Reset to initial position */
}

.generate-btn:focus:not(:active)::before,
.clear-btn:focus:not(:active)::before {
    box-shadow: 0 0 0 2px #7AA97A, 0 0.625em 0 0 rgba(227, 255, 232, 0);
    transform: translate3d(0, 0.75em, -1em);
}

/* For clear button */
.clear-btn:focus:not(:active)::before {
    box-shadow: 0 0 0 2px #E7A1A1, 0 0.625em 0 0 rgba(255, 200, 200, 0);
}


.results {
    font-size: 36px;
    overflow-y: auto;
    overflow-x: hidden;
    font-weight: bold;
    width: 100%;
    padding-top: 5px;
    /*padding-right: 10px;*/
    /*padding-left: 10px;*/
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(240, 255, 245, 0.8) rgba(255, 255, 255, 0.1);
}

.results-empty {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    padding: 40px 0;
    text-align: center;
}

.results-summary {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-summary);
    padding: 18px 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-align: left;
}

.summary-count {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-emphasis {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

/* ===== RESULTS STYLING ===== */
.result-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.result-badge {
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
    border-radius: 18px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width:100%;
}

.result-item:hover .result-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

.result-item.newest .result-badge {
    /*background: rgba(255, 255, 255, 0.25);*/
    border-color: rgba(255, 255, 255, 0.5);
    animation: fadeInScale 0.3s ease-out;
}

.result-number {
    font-size: 42px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-item.newest .result-number {
    font-size: 48px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.result-number::before {
    content: '🎯';
    font-size: 32px;
    opacity: 0.8;
}

.result-meta {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
}

.result-position {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: normal;
    vertical-align: middle;
}

.new-badge {
    background: rgba(10, 180, 100, 0.5);
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}



/* Gradient color coding for newest item */
.result-item.newest .result-badge {
    /*background: linear-gradient(135deg, rgba(99, 126, 206, 0.3), rgba(79, 106, 186, 0.2));*/
}

/* ===== END RESULTS STYLING ===== */

/* Custom scrollbar styling for Webkit browsers */
.results::-webkit-scrollbar {
    width: 12px;
}

.results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.results::-webkit-scrollbar-thumb {
    background: rgb(240, 255, 245);
    border-radius: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.results::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 106, 186, 1);
}

h2 {
    font-size: 44px;
    text-shadow: 2px 2px 2px rgba(0,0,0, 0.25);
    margin-top: 0px;
    margin-bottom: 0;
    font-weight: bold;
    padding-top: 20px;
    color: #ffffff;
}


/* ===== MOBILE RESPONSIVE STYLES ===== */
@media screen and (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .app-shell {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .left-column, .right-column {
        width: 100%;
        padding: 15px;
    }

    .left-column {
        left: 0;
        padding-left: 15px;
        padding-right: 15px;
        min-height: 50vh;
        align-items: center;
        justify-content: center;
    }

    .right-column {
        height: auto;
        min-height: 50vh;
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 20px;
        align-items: center;
        justify-content: center;
    }

    .logo {
        width: 140px;
        padding-bottom: 30px;
        margin-bottom: 10px;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    .number-display {
        font-size: 150px;
        margin-top: 0px;
        margin-left: auto;
        margin-right: auto;
        flex-grow: 0;
        color: #ffffff;
        background: transparent;
        text-shadow: none;
    }

    .generate-btn, .clear-btn {
        width: 100%;
        max-width: 400px;
        font-size: 18px;
        margin-bottom: 30px;
        margin-left: auto;
        margin-right: auto;
    }

    .generate-btn {
        margin-top: 20px;
    }

    .results {
        height: 300px;
        max-height: 300px;
        font-size: 24px;
        padding-top: 5px;
        padding-left: 15px;
        padding-right: 15px;
        gap: 10px;
        margin-left: auto;
        margin-right: auto;
    }

    .results-summary {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .summary-emphasis {
        font-size: 36px;
    }

    .result-badge {
        padding: 12px 15px;
        border-radius: 18px;
    }

    .result-number {
        font-size: 32px;
    }

    .result-item.newest .result-number {
        font-size: 36px;
    }

    .result-number::before {
        font-size: 24px;
    }

    .result-position {
        font-size: 12px;
    }

    .new-badge {
        font-size: 10px;
        padding: 3px 6px;
    }

    h2 {
        font-size: 32px;
        padding-top: 15px;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .result-meta {
        gap: 3px;
    }
}

@media screen and (max-width: 480px) {
    .logo {
        width: 120px;
        margin-left: auto;
        margin-right: auto;
    }

    .number-display {
        font-size: 120px;
        margin-top: -30px;
        margin-left: auto;
        margin-right: auto;
        color: #ffffff;
        background: transparent;
        text-shadow: none;
    }

    .results {
        height: 250px;
        max-height: 250px;
        font-size: 22px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .results-summary {
        gap: 8px;
    }

    .summary-emphasis {
        font-size: 32px;
    }

    .result-number {
        font-size: 28px;
    }

    .result-item.newest .result-number {
        font-size: 32px;
    }

    .generate-btn, .clear-btn {
        width: 100%;
        max-width: 350px;
        font-size: 16px;
        padding: 1.25em 2em;
        margin-left: auto;
        margin-right: auto;
    }

    h2 {
        font-size: 28px;
        text-align: center;
    }
}
/* ===== END MOBILE RESPONSIVE STYLES ===== */