        body { padding-bottom: 0px; margin: 0; }
        .pääpaneeli-wrapper { height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #121212; position: relative; }
        .pääpaneeli { height: 1180px !important; }

        
        /* Alapalkki ja napit */
        .alapalkki { width: 100%; background: #1a1a1a; border-top: 1px solid #333; padding: 15px 2vw; display: flex; justify-content: center; align-items: center; border-radius: 0 0 12px 12px; box-sizing: border-box; }
        
        .arvonta-napit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; width: 100%; max-width: 1850px; }

        .juonto-nappi, .hallinta-nappi, .auto-arvo-nappi, .nollaa-nappi {
            background: #2a2a2a; color: #ecf0f1; border: 1px solid #444; padding: 5px 8px; font-size: 18px; font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; border-radius: 8px; cursor: pointer; transition: 0.2s; font-weight: bold; text-transform: uppercase; box-shadow: none;
            text-align: center; overflow: hidden; flex: 1 1 auto;
            min-height: 75px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
        }
        
        .arvo-nappi, .bingo-huuto-nappi, .vaihe-nappi {
            padding: 5px 8px; font-size: 18px; font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; border-radius: 8px; cursor: pointer; transition: 0.2s; font-weight: bold; text-transform: uppercase; box-shadow: none;
            text-align: center; overflow: hidden; flex: 1 1 auto;
            min-height: 75px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
        }

        .juonto-nappi:hover, .hallinta-nappi:hover { background: #444; color: #fff; }

        .arvo-nappi { background: var(--teema-pää); color: #111; font-weight: bold; font-size: 22px; padding: 0 30px; min-height: 90px; flex: 1 1 auto; border: 2px solid #fff; }
        .arvo-nappi:hover:not(:disabled) { opacity: 0.8; }
        .arvo-nappi:disabled { background: #1a1a1a; color: #555; border-color: #333; cursor: not-allowed; }

        .bingo-huuto-nappi { background: #e74c3c; color: #fff; border: 1px solid #c0392b; }
        .bingo-huuto-nappi:hover { background: #c0392b; }

        .vaihe-nappi { background: #8e44ad; color: #fff; border: 1px solid #732d91; min-height: 90px; font-size: 16px; }
        .vaihe-nappi:hover:not(:disabled) { background: #732d91; }
        .vaihe-nappi:disabled { background: #2a1b38; color: #666; border-color: #2a1b38; cursor: not-allowed; }

        .auto-kääre { display: flex; align-items: center; background: #242424; border-radius: 8px; padding: 0 5px; border: 1px solid #444; flex: 1 1 auto; white-space: nowrap; min-height: 90px;}
        .auto-arvo-nappi { color: #ecf0f1; border: none; background: transparent; padding: 5px; font-size: 20px; min-width: auto; text-align: left; overflow: visible; display: flex; align-items: center; }
        .auto-arvo-nappi:hover { background: transparent; opacity: 0.8; }
        .auto-aktiivinen { animation: sykki-hehku 1.5s infinite alternate; }

        @keyframes sykki-hehku {
            0% { box-shadow: 0 0 5px var(--teema-pää); background-color: rgba(241, 196, 15, 0.1); }
            100% { box-shadow: 0 0 20px var(--teema-pää); background-color: rgba(241, 196, 15, 0.4); border-radius: 8px; }
        }

        .auto-viive-input { width: 50px; min-width: 50px; max-width: 50px; padding: 5px 0; background: transparent; color: white; border: none; font-size: 20px; text-align: center; outline: none; border-left: 1px solid #444; margin-left: 5px; flex-shrink: 0; }
        .auto-viive-input::-webkit-outer-spin-button, .auto-viive-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

        
        /* Hallintapaneelin tyylit */
        .hallinta-kortti { background: #1a1a1a; padding: 20px; border-radius: 8px; border: 1px solid #444; margin-bottom: 20px; }
        .tarkista-nappi { background: #27ae60; color: white; border: none; padding: 10px 20px; font-size: 16px; border-radius: 6px; cursor: pointer; transition: 0.3s; font-weight: bold; text-transform: uppercase; }
        .tarkista-nappi:hover { background: #2ecc71; transform: translateY(-2px); }
        input[type="text"], input[type="number"] { padding: 10px; font-size: 16px; background: #2a2a2a; color: white; border: 2px solid #555; border-radius: 6px; outline: none; transition: 0.3s; width: 100%; }
        input[type="number"] { text-align: center; }
        input[type="text"]:focus, input[type="number"]:focus { border-color: var(--teema-pää); }
        .hotkey-input { text-align: center; font-weight: bold; color: var(--teema-pää); cursor: pointer; background: #333; }
        .nollaa-nappi { background: #c0392b; color: white; border: none; padding: 12px 20px; font-size: 16px; border-radius: 6px; cursor: pointer; transition: 0.3s; font-weight: bold; text-transform: uppercase; }
        .nollaa-nappi:hover { background: #e74c3c; transform: translateY(-2px); }
        .toggle-kytkin { position: relative; display: inline-block; width: 40px; height: 20px; }
        .toggle-kytkin input { opacity: 0; width: 0; height: 0; }
        .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #555; transition: .4s; border-radius: 20px; }
        .slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
        input:checked + .slider { background-color: #27ae60; }
        input:checked + .slider:before { transform: translateX(20px); }
        input:disabled + .slider { opacity: 0.5; cursor: not-allowed; }
        .file-input-wrapper { background: #2a2a2a; border: 2px dashed #555; border-radius: 6px; padding: 10px; text-align: center; cursor: pointer; transition: 0.3s; margin-top: 10px; display: block;}
        .file-input-wrapper:hover { border-color: var(--teema-pää); }
        input[type="file"] { display: none; }
        .poista-logo-btn { background: transparent; color: #e74c3c; border: 1px solid #e74c3c; padding: 8px 15px; border-radius: 4px; cursor: pointer; font-size: 13px; margin-top: 10px; display: none; font-weight: bold; width: 100%;}
        .poista-logo-btn:hover { background: #e74c3c; color: white; }
        
        .hallinta-tabs { display: flex; border-bottom: 2px solid #444; margin-bottom: 20px; overflow-x: auto; }
        .tab-btn { flex: 1; background: transparent; border: none; color: #aaa; padding: 15px 10px; cursor: pointer; font-size: 15px; font-weight: bold; transition: 0.3s; border-bottom: 3px solid transparent; white-space: nowrap; outline: none; }
        .tab-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
        .tab-btn.aktiivinen { color: var(--teema-pää); border-bottom-color: var(--teema-pää); }
        .tab-sisalto { display: none; animation: fadein 0.3s; text-align: left; }
        .tab-sisalto.aktiivinen { display: block; }
        @keyframes fadein { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

        /* Piirtoruudukon tyylit */
        .piirto-ruudukko { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 280px; margin: 0 auto 15px auto; }
        .piirto-solu { aspect-ratio: 1; background: #333; border: 2px solid #555; border-radius: 6px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
        .piirto-solu:hover { border-color: var(--teema-pää); }
        .piirto-solu.valittu { background: var(--teema-pää); border-color: var(--teema-tumma); box-shadow: inset 0 0 10px rgba(0,0,0,0.5); }

        /* Tallennetut kuviot lista */
        .tallennetut-kuviot-grid { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; justify-content: center; }
        .tallennettu-kuvio-item { background: #222; border: 1px solid #444; padding: 8px; border-radius: 6px; cursor: pointer; transition: 0.2s; position: relative; }
        .tallennettu-kuvio-item:hover { border-color: var(--teema-pää); transform: translateY(-2px); }
        .poista-kuvio-btn { position: absolute; top: -8px; right: -8px; background: #e74c3c; color: white; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 10px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; }
        .poista-kuvio-btn:hover { background: #c0392b; transform: scale(1.1); }
        .tk-ruudukko { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; width: 60px; }
        .tk-solu { aspect-ratio: 1; background: #333; border-radius: 2px; }
        .tk-solu.valittu { background: var(--teema-pää); }

        /* Range Sliderit */
        .range-slider { -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px; background: #444; outline: none; margin: 10px 0 20px 0; }
        .range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--teema-pää); cursor: pointer; transition: 0.2s; }
        .range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

        /* Modalit */
        .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); align-items: center; justify-content: center; transition: background-color 0.2s ease-in-out; }
        .modal:has(input[type="range"]:active) { background-color: rgba(0,0,0,0.1); }
        .modal:has(input[type="range"]:active) .modal-content { opacity: 0.2; }
        .modal-content { background-color: var(--paneeli-tausta); padding: 30px; border: 2px solid var(--teema-pää); border-radius: 12px; width: 90%; max-width: 500px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.7); transition: opacity 0.2s ease-in-out; }
        .sulje-nappi { color: #aaa; position: absolute; top: 10px; right: 20px; font-size: 35px; font-weight: bold; cursor: pointer; transition: 0.2s; }
        .sulje-nappi:hover { color: #fff; }
        h2 { color: var(--teema-pää); margin-top: 0; text-transform: uppercase; letter-spacing: 1px; }
        #tarkistus-tulos { margin-top: 10px; font-size: 16px; text-align: left; }
        .voitto { color: #2ecc71 !important; }
        .ei-voittoa { color: #e74c3c !important; }
        .ruudukko-tulos { margin-top: 15px; font-family: monospace; font-size: 14px; color: #ccc; background: #1a1a1a; padding: 10px; border-radius: 5px; border: 1px solid #333;}
        .osuma-rivi { color: #2ecc71; font-weight: bold; }
        .viimeisin-osuma { color: #121212; background-color: var(--teema-pää); padding: 2px 6px; border-radius: 4px; font-weight: 900; box-shadow: 0 0 8px rgba(241, 196, 15, 0.8); display: inline-block; }
        .modal-nollaus-sisalto { text-align: center; border-color: #e74c3c; }
        .modal-vaihe-sisalto { text-align: center; border-color: #8e44ad; }
        .modal-syotto-sisalto { text-align: center; border-color: #3498db; }
        .modal-hallinta-sisalto { border-color: #bdc3c7; max-width: 600px; padding: 20px 30px 30px 30px; max-height: 90vh; overflow-y: auto; }
        .nollaus-napit { display: flex; justify-content: center; gap: 20px; margin-top: 25px; }
        .kylla-nappi { background: #e74c3c; color: white; border: none; padding: 10px 30px; font-size: 18px; border-radius: 6px; cursor: pointer; transition: 0.3s; font-weight: bold; }
        .kylla-nappi:hover { background: #c0392b; transform: scale(1.05); }
        .kylla-nappi-violetti { background: #8e44ad; color: white; border: none; padding: 10px 30px; font-size: 18px; border-radius: 6px; cursor: pointer; transition: 0.3s; font-weight: bold; }
        .kylla-nappi-violetti:hover { background: #9b59b6; transform: scale(1.05); }
        .ei-nappi { background: #7f8c8d; color: white; border: none; padding: 10px 30px; font-size: 18px; border-radius: 6px; cursor: pointer; transition: 0.3s; font-weight: bold; }
        .ei-nappi:hover { background: #95a5a6; transform: scale(1.05); }
        .nappi-perus { background: #2a2a2a; color: #fff; border: 1px solid #555; padding: 8px 15px; border-radius: 6px; cursor: pointer; transition: 0.2s; font-weight: bold; }
        .nappi-perus:hover { background: #444; border-color: var(--teema-pää); }
   