:root {
            --bg-main: #06080e;
            --bg-card: rgba(15, 20, 35, 0.7);
            --neon-pink: #d900ff;
            --text-main: #ffffff;
            --text-muted: #8899aa;
            --border-color: rgba(255, 255, 255, 0.15);
            --danger: #ff2222;
            --danger-hover: #ff5555;
            --accent-yellow: #ffde00;
            --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        }

        * {
            box-sizing: border-box;
            font-family: 'Prompt', sans-serif;
        }

        body {
            position: relative;
            background-color: var(--bg-main);
            background-image: repeating-linear-gradient(
                0deg,
                transparent,
                transparent 2px,
                rgba(0, 0, 0, 0.6) 3px,
                rgba(0, 0, 0, 0.6) 4px
            );
            color: var(--text-main);
            padding: 30px 14px 40px;
            margin: 0;
            display: flex;
            justify-content: center;
            min-height: 100vh;
        }

        .app-container {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 1180px;
            display: flex;
            flex-direction: column;
            border: 3px solid var(--neon-pink);
            border-radius: 12px;
            padding: 30px 20px;
            background: rgba(10, 14, 26, 0.85);
            box-shadow: 0 0 15px var(--neon-pink), inset 0 0 15px rgba(217, 0, 255, 0.3);
        }

        /* โลโก้ CSS 3D */
        .css-logo {
            text-align: center;
            margin: 0 auto 25px auto;
            font-style: italic;
            font-weight: 900;
            cursor: default;
            user-select: none;
            filter: drop-shadow(4px 4px 0px #000) drop-shadow(0px 0px 15px rgba(255, 102, 0, 0.7));
        }

        .css-logo-top {
            font-size: clamp(65px, 8vw, 90px);
            line-height: 0.9;
            letter-spacing: -2px;
            background: linear-gradient(180deg, #fff200 0%, #ff6600 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            -webkit-text-stroke: 2px #ffffff;
        }

        .css-logo-bottom {
            font-size: clamp(26px, 3.5vw, 36px);
            line-height: 1;
            letter-spacing: 8px;
            margin-top: -5px;
            margin-left: 10px;
            background: linear-gradient(180deg, #fff200 0%, #ff6600 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            -webkit-text-stroke: 1.5px #ffffff;
        }

        .input-section,
        .result-card,
        .static-item {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            box-shadow: var(--glass-shadow);
        }

        .input-section {
            position: relative;
            overflow: hidden;
            border-radius: 12px;
            padding: 15px 18px;
            margin-bottom: 20px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        /* ปรับแต่งช่องกรอกตัวเลขให้อยู่กึ่งกลางแนวตั้งและแนวนอน */
        input[type="text"] {
            width: 100%;
            height: 60px;
            line-height: 56px;
            padding: 0;
            border: 2px solid #334466;
            border-radius: 8px;
            background: #000000;
            color: #00ffea;
            font-size: 28px;
            font-weight: 700;
            text-align: center;
            outline: none;
            transition: all 0.3s ease;
            letter-spacing: 5px;
            box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
        }

        input[type="text"]:focus {
            border-color: var(--accent-yellow);
            box-shadow: 0 0 15px rgba(255, 222, 0, 0.4);
            background: #111;
        }

        /* ปรับ Placeholder ให้อยู่กึ่งกลางแนวตั้งและแนวนอน */
        input[type="text"]::placeholder {
            color: #556677;
            font-size: 18px;
            font-weight: 400;
            letter-spacing: normal;
            line-height: 56px;
            text-align: center;
        }

        .action-buttons {
            display: flex;
            justify-content: center;
            margin-top: 10px;
        }

        .btn-reset {
            border-radius: 5px;
            padding: 8px 25px;
            font-size: 14px;
            font-weight: 700;
            background: #222;
            color: var(--danger);
            border: 2px solid var(--danger);
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
        }

        .btn-reset:hover {
            background: var(--danger);
            color: #fff;
            box-shadow: 0 0 10px var(--danger);
        }

        .results-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
        }

        .result-card {
            border-radius: 10px;
            padding: 12px 14px;
            display: flex;
            flex-direction: column;
            border: 1px solid #2a3449;
            transition: all 0.2s ease;
        }

        .result-card:hover {
            border-color: var(--neon-pink);
            box-shadow: 0 0 10px rgba(217, 0, 255, 0.2);
            transform: translateY(-2px);
        }

        .card-header {
            margin-bottom: 8px;
            padding-bottom: 8px;
            border-bottom: 1px solid #2a3449;
        }

        .card-title {
            font-size: 16px;
            font-weight: 600;
            margin: 0;
            color: #ffffff;
            text-align: center;
        }

        .output-area {
            flex-grow: 1;
            font-size: 14px;
            font-weight: 600;
            line-height: 1.6;
            color: #0fe150;
            letter-spacing: 1px;
            word-break: break-word;
            min-height: 55px;
            max-height: 85px;
            overflow-y: auto;
            text-align: center;
        }

        .output-area::-webkit-scrollbar { width: 4px; }
        .output-area::-webkit-scrollbar-thumb { background-color: #334466; border-radius: 4px; }

        .empty-text {
            color: #445566;
            font-style: italic;
            font-size: 13px;
        }

        .btn-copy, .btn-copy-clean {
            width: 100%;
            margin-top: 10px;
            padding: 8px;
            background: linear-gradient(180deg, #ffea00 0%, #ff8c00 100%);
            color: #000000;
            border: 2px solid #000000;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 2px 2px 0px #000;
            transition: all 0.1s ease;
            text-shadow: 1px 1px 0px rgba(255,255,255,0.4);
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .btn-copy:active, .btn-copy-clean:active {
            transform: translate(2px, 2px);
            box-shadow: 0px 0px 0px #000;
        }

        .static-section {
            border-top: 2px dashed #2a3449;
            margin-top: 30px;
            padding-top: 25px;
        }

        .static-header {
            text-align: center;
            font-size: 22px;
            font-weight: 700;
            color: var(--neon-pink);
            margin-bottom: 20px;
            text-shadow: 0 0 10px rgba(217, 0, 255, 0.4);
        }

        .static-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .static-item {
            text-align: center;
            border-radius: 10px;
            padding: 16px;
            border: 1px solid #2a3449;
        }

        .static-title {
            font-size: 18px;
            font-weight: 700;
            margin: 0 0 10px 0;
            color: #ffde00;
        }

        .static-numbers {
            font-size: 15px;
            font-weight: 500;
            color: #00e5ff;
            line-height: 1.8;
            word-break: break-word;
            margin-bottom: 12px;
        }

        .static-item-scroll {
            display: flex;
            flex-direction: column;
            min-width: 0;
            min-height: 0;
        }

        .static-scroll-frame {
            position: relative;
            flex: 1;
            min-height: 0;
            margin-bottom: 12px;
        }

        .static-numbers-scroll {
            position: absolute;
            inset: 0;
            margin-bottom: 0;
            padding-right: 6px;
            overflow-y: auto;
            overscroll-behavior: contain;
            scrollbar-width: thin;
            scrollbar-color: #334466 transparent;
        }

        .static-numbers-scroll::-webkit-scrollbar { width: 6px; }
        .static-numbers-scroll::-webkit-scrollbar-thumb { background: #334466; border-radius: 4px; }

        .static-numbers-scroll:focus-visible {
            outline: 2px solid var(--accent-yellow);
            outline-offset: 2px;
        }

        .site-copyright {
            margin-top: 40px;
            padding-top: 15px;
            border-top: 1px solid #2a3449;
            color: #556677;
            text-align: center;
            font-size: 12px;
        }

        @media (max-width: 768px) {
            body { padding: 15px 10px 30px; }
            .app-container { border-width: 2px; padding: 20px 10px; }
            .results-grid { grid-template-columns: 1fr; gap: 10px; }
            .static-grid { grid-template-columns: 1fr; }
            .static-scroll-frame { min-height: 162px; }
            .css-logo-top { font-size: 70px; }
            .css-logo-bottom { font-size: 28px; }
        }

.calculation-status { margin: 0 0 12px; text-align: center; font-size: 13px; color: #ff8b8b; }
.btn-copy.copy-success, .btn-copy-clean.copy-success { background: #4CAF50; color: #ffffff; border-color: #2E7D32; }
.clipboard-helper { position: fixed; left: -9999px; top: 0; }

.result-card { position: relative; isolation: isolate; overflow: hidden; }
.result-card > .card-header,
.result-card > .output-area,
.result-card > .btn-copy { position: relative; z-index: 2; }
.output-area { perspective: 400px; }
.holo-token, .holo-digit { display: inline-block; font-variant-numeric: tabular-nums; }
.holo-digit { transform-origin: 50% 80%; }
.holo-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.holo-field { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse at 50% 48%, rgba(15,225,80,0.28), transparent 68%), repeating-linear-gradient(0deg, transparent 0, transparent 5px, rgba(0,255,230,0.10) 6px, transparent 7px); }
.holo-ring { position: absolute; top: 45%; left: 50%; width: 90px; height: 90px; margin: -45px; border: 1px solid #6fffc3; border-radius: 50%; box-shadow: 0 0 12px rgba(15,225,80,0.65), inset 0 0 12px rgba(15,225,80,0.25); opacity: 0; }
.holo-ring.holo-violet { border-color: #e86bff; box-shadow: 0 0 14px rgba(217,0,255,0.65); }
.holo-spark { position: absolute; left: 50%; top: 46%; width: 3px; height: 10px; border-radius: 4px; background: var(--spark-color); box-shadow: 0 0 6px var(--spark-color); opacity: 0; }
.holo-spark-color-0 { --spark-color: #ff557b; }
.holo-spark-color-1 { --spark-color: #ff9955; }
.holo-spark-color-2 { --spark-color: #ffe05c; }
.holo-spark-color-3 { --spark-color: #58ff9a; }
.holo-spark-color-4 { --spark-color: #4ceaff; }
.holo-spark-color-5 { --spark-color: #7299ff; }
.holo-spark-color-6 { --spark-color: #d67aff; }
@media (prefers-reduced-motion: reduce) { .holo-fx { display: none; } }
