
        :root {
            --bg: #f5f5f5;
            --panel-bg: #ffffff;
            --text: #333;
            --muted: #999;
            --accent: #cc9c00;
            --muted-border: #ddd;
        }

        .theme-dark {
            --bg: #0f1720;
            --panel-bg: #0b1220;
            --text: #e6eef8;
            --muted: #93a3bf;
            --accent: #cc9c00;
            --muted-border: #1e293b;
        }

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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: var(--bg);
            color: var(--text);
            padding: 20px;
            min-height: 100vh;
            transition: background .18s, color .18s;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
        }

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

        h1 {
            font-size: 24px;
            color: var(--text);
        }

        h1 svg {
            color: var(--accent);
        }

        .tabs {
            display: flex;
            gap: 10px;
            margin-left: 10px;
        }

        .tab-btn {
            margin-bottom: -1px;
            padding: 8px 16px;
            border: 1px solid; 
            border-color: var(--muted-border);
            background: var(--bg);
            color: var(--text);
            cursor: pointer;
            border-radius: 6px 6px 0 0;
            transition: background .18s, border-color .18s, color .18s;
        }

        .tab-btn.active {
            background: var(--panel-bg);
            color: var(--accent);
            border-bottom: 1px solid var(--panel-bg);
            z-index: 1; 
        }

        .panel {
            padding: 30px;
            background: var(--panel-bg);
            border-radius: 6px;
            border: 1px solid var(--muted-border);
            box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
            transition: background .18s, border-color .18s;
            display: none;
            z-index: 0; 
        }

        .panel.active {
            display: block;
        }

        h2 {
            font-size: 18px;
            font-weight: normal;
            margin-bottom: 15px;
            color: var(--text);
        }
        .app-header h2 {
            margin-bottom: 2px;
            margin-left: 20px;
            font-size: 1rem;
            color: var(--muted);
        }

        .notes, .input-area {
            font-size: 15px;
            font-weight: normal;
            line-height: 1.4;
            color: var(--muted);
        }

        .input-area p {
            bottom: 0;
        } 

        .input-area a, .notes a {
            color: var(--muted);
            display: flex;
            flex-direction: row;
            align-items: center;
            text-decoration: none;
            gap: .2rem;
        } 
        .input-area a:hover, .notes a:hover {
            color: var(--accent);
        } 

        .notes ul {
            margin-bottom: 15px;
            padding-left: 15px;
        }

        .notes ul li { 
        margin-bottom: 3px;
        font-size: 12px;
        }

        .input-area, .notes {
            display: flex;
            flex-direction: column;
            justify-content: space-between; 
            height: 100%; 
        }

        #winInput {
            width: 100%;
            padding: 12px;
            font-size: 16px;
            border: 2px solid var(--muted-border);
            border-radius: 4px;
            font-family: inherit;
            resize: vertical;
            min-height: 130px;
            background: transparent;
            color: var(--text);
        }

        #winInput:focus {
            outline: none;
            border-color: var(--muted);
        }

        #winInput::placeholder {
            color: var(--muted);
            opacity: 1;
        }

        .help-text {
            font-size: 14px;
            color: var(--muted);
            margin-top: 8px;
        }

        .help-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 6px 0 2rem 0;
        }

        .save-confirmation {
            font-size: 13px;
            color: var(--accent);
            margin-top: 6px;
            opacity: 0;
            transition: opacity 0.2s;
        }
        .save-confirmation.show {
            opacity: 1;
        }


        .admin-panel { 
            display: flex;
            gap:2em;
            flex-wrap: none;
            justify-content: space-around;

        }

        .admin-panel > * {
            flex: 1;  
            min-width: 0;    
        }

        .backup-controls {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        button {
            padding: 10px 14px;
            font-size: 13px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-family: inherit;
            background: none;
            transition: background .18s, transform .08s;
            display: inline-flex;
            align-items: center;
            border: 1px solid var(--muted);
            color: var(--text);
            gap: 8px;
        }

        button:active {
            transform: translateY(1px);
        }



        button:hover {
            border: 1px solid var(--accent);
        }

        #fileInput {
            display: none;
        }

        .random-win {
            position: relative;
            overflow: hidden;
            background: var(--card-bg);
            padding: 3rem 2rem;
            margin-bottom: 20px;
            min-height: 100px;
            display: flex;
            align-items: center;
            justify-content: start;
            position: relative;
            border: 5px solid;
            border-radius: 18px;
            border-image-slice: 1;
            border-image-source: linear-gradient(-25deg, #eeda97, var(--accent));
        }


        .star {
            position: absolute;
            background: gold;
            clip-path: polygon(
                50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 
                50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%
            );
            pointer-events: none;
            opacity: 1;
            transform: translate(0,0) scale(1);
            animation: starburst 0.8s forwards;
            }

        @keyframes starburst {
        to {
            transform: translate(var(--x), var(--y)) scale(0);
            opacity: 0;
        }
        }

        .random-win-text {
            font-size: 30px;
            color: var(--text);
            line-height: 1.3;
            text-align: left;
        }
        .random-win .win-date {
            font-size: 1rem;
            margin-bottom: .5rem;
        }
        .random-win-empty {
            color: var(--muted);
            font-style: italic;
        }

        .refresh-btn {
            background: none;
            color: var(--muted);
            border: none;
            padding: 8px;
            cursor: pointer;
            position: absolute;
            top: 12px;
            right: 12px;
            font-size: 18px;
            line-height: 1;
            transition: color .12s;
        }

        .refresh-btn:hover {
            color: var(--accent);
        }

        .archive {}

        .win-item {
            padding: 15px 0;
            border-bottom: 1px solid var(--muted-border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background .18s;
        }

        .win-item:last-child {
            border-bottom: none;
        }

        .win-text {
            color: var(--text);
            line-height: 1.4;
            word-break: break-word;
            flex: 1;
        }

        .win-date {
            font-size: 12px;
            color: var(--muted);
            white-space: nowrap;
        }

        .win-actions {
            display: flex;
            gap: 6px;
            margin-left: 10px;
        }

        .win-actions button {
            background: none;
            border: none;
            cursor: pointer;
            color: var(--muted);
            padding: 4px;
            font-size: 16px;
            transition: color .15s;
        }

        .win-actions button:hover {
            color: var(--accent);
        }

        .load-more-btn {
            margin: 15px 0 0 0;
            display: inline-flex;
            align-items: center; 
            padding: 10px 14px;
            border-radius: 6px;
            background: none;
            color: var(--text);
            border: 2px solid var(--muted-border);
            cursor: pointer;
            font-family: inherit;
            transition: background .18s, color .18s, border-color .18s;
        }

        .load-more-btn:hover {
            color: var(--text);
            border-color: var(--accent);
        }

        .theme-toggle {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            display: inline-grid;
            place-items: center;
            background: transparent;
            color: var(--text);
        }
        .theme-toggle svg {
            display: block; 
            width: 16px; 
            height: 16px; 
            transform: translateX(-2px);
        }
        .theme-toggle:hover {
            color: var(--accent); 
        }


        #monthFilter {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            color: var(--text);
            background: var(--panel-bg) no-repeat right 10px center;
            padding: 7px 30px 7px 10px;
            border: 2px solid var(--muted-border);
            border-radius: 4px;
            font-family: inherit;
            font-size: 14px;
            cursor: pointer;
        }

        #monthFilter:focus {
            outline: none;
            border-color: var(--accent); 
            box-shadow: none;  
        }


        body.theme-dark #monthFilter {
            color: var(--text);
            background: var(--panel-bg);
            border-color: var(--muted-border);
        }

        .message { 
            display: flex;
            line-height: 1.4;
            justify-content: space-between;
            align-items: start;
            flex-direction: row;
            background: var(--panel-bg);
            border: 2px dashed var(--accent);
            padding: 1rem;
            margin: 1rem 0;
            gap: 10px;
        }

        .message a {
            text-decoration: none;
            color: var(--muted);
        } 
        .message a:hover {
            color: var(--accent);
        } 

        .hideMessageBtn {
            background: none;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            max-height: 18px;   
            padding: 0 0 0 10px;
            color: var(--muted);
        }
        .hideMessageBtn:hover {
            color: var(--accent);
        }


        .filter-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            gap: 10px;
        }

        .add-btn {
            background: none;
            color: var(--text);
            border: 2px solid var(--muted-border);
            border-radius: 4px;
            padding: 6px 14px;
            font-size: 14px;
            cursor: pointer;
            transition: background .18s, transform .1s;
        }

        .add-btn:hover {
            border-color: var(--accent);
        }

        .add-btn:active {
            transform: translateY(1px);
        }

        details {
            cursor:pointer;
            font-size:12px; 
            line-height: 1.4;
            border-top: 1px solid var(--muted-border);
            padding-top: 1rem;
            margin: 1rem 0;
            max-width: 80%;
        }

        details summary {
            cursor:pointer;
            font-size:14px; 
            color:var(--muted); 
            margin-bottom:15px;
        }

        .form-container {
            margin: 1px !important;
        }
        footer {
            font-size: 12px;
            color: var(--muted);
            margin-top: 1rem;
        }

        footer a {
            text-decoration: none;
            color: inherit;
        }
        footer a:hover {
            color: var(--text);
            text-decoration: none;
        }
        .branding { 
            display: flex; 
            align-items: end;
        }

        .modal {
            display: none;
            position: fixed;
            top:0; left:0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.5);
            justify-content: center;
            align-items: center;
            z-index: 9999;
            }
        .modal-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text);
            padding: 0;
            width: 30px;
            height: 30px;
            line-height: 1;
        }

        .modal-close:hover {
            opacity: 0.7;
        }

        .modal-content {
            color: #333;
            position: relative;
            background: white;
            padding: 2rem;
            border-radius: 0.5rem;
            max-width: 400px;
            width: 90%;
            text-align: center;
            z-index: 10000;
            }

        .modal h2 { 
            font-size: 1.2rem;
            /* color: var(--text); */
        }


        .modal p {
            font-size: .9rem;
        }
        

        .card-content {
            font-size: 18px;
            color: var(--text);
            font-weight: 500;
        }


        /* Roundup emails signup */
        .email-signup-section {
            border-top: 1px solid var(--muted-border);
            padding-top: 1rem;
            max-width: 90%;
            margin: 2rem 0;
        }
                                  
                                   
        .email-signup-section h3 {
            margin: 0 0 8px 0;
            font-size: 1rem;
            font-weight: 500;
        }
        .email-signup-section h3 span, .modal h2 span {
            color: var(--accent);
        }

        .email-signup-section p {
            margin: 0 0 16px 0;
            font-size: .8rem;
            color: var(--text-secondary);
        }

        #emailSignupForm {
            display: flex;
            gap: 8px;
        }

        #emailInput {
            flex: 1;
            padding: 10px 12px;
            border: 2px solid var(--muted-border);
            border-radius: 6px;
            background: var(--bg);
            color: var(--muted);
            font-size: .8rem;
        }
                #emailInput::placeholder{ 
                    color: var(--muted);
                }

        /* #emailSubmitBtn {
            padding: 10px 20px;
            background: var(--accent);
            color: #000;
            border: none;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            font-size: 14px;
            white-space: nowrap;
        } */

        #emailSubmitBtn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .email-status {
            margin-top: 12px;
            font-size: 14px;
        }

        @media(max-width:768px) {
            .branding {
            flex-direction: column;
            align-items: start;
            }
            .panel {
                padding: 10px;
            }
            .admin-panel {
                flex-direction: column;
            }

            .archive .win-item {
                text-align: left;
                align-items: flex-start;
                flex-direction: column;
            }

            .win-actions {
                margin-top: .5rem;
            }

            .win-actions button svg {
                width: 18px;
                height: 18px;
            }

            .win-date {
                margin-top: .5rem;
                font-size: 12px;
            }
        }
