: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; }
