 * { box-sizing: border-box; }
        body {
            font-family: 'Noto Sans KR', sans-serif;
            background: #f8f9fa;
            color: #333;
            margin: 0;
            padding: 0;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 30px;
            background: #007bff;
            color: #fff;
        }
        header h1 { margin: 0; font-size: 24px; }
        #timer { font-size: 20px; font-weight: bold; }
        main {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        #start-btn, #rank-btn {
            width: 80%; height: 150px;
            padding: 12px 25px;
            font-size: 1.7em;
            background-color: #28a745;
            border: none; border-radius: 8px;
            color: #fff; cursor: pointer;
            margin: 20px 0;
            transition: background-color 0.2s ease;
        }
        #start-btn:hover, #rank-btn:hover { background-color: #218838; }
        #game-board {
            display: grid;
            grid-template-columns: repeat(5, 70px);
            grid-gap: 10px;
            justify-content: center;
            margin-top: 20px;
        }
        .number-btn {
            width: 70px; height: 70px;
            font-size: 20px;
            background: #ffffff;
            border: 2px solid #dee2e6;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.1s, color 0.2s;
        }
        .number-btn:hover:not(:disabled) { background: #e9ecef; }
        .number-btn:active:not(:disabled) { transform: scale(0.95); }
        .number-btn:disabled {
            background: #ced4da; color: #6c757d; cursor: not-allowed;
        }
        #result {
            font-size: 22px;
            margin-top: 20px;
            font-weight: bold;
            color: #dc3545;
        }
        .modal-overlay {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.6);
            display: none; z-index: 1000;
            justify-content: center; align-items: center;
        }
        .modal {
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            background: #fff; border-radius: 10px;
            width: 90%; max-width: 400px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
            padding: 20px; animation: fadeIn 0.3s ease-out;
            min-height: 250px;
        }
        .modal h3 { margin-top: 0; color: #007bff; }
        .modal ol { padding-left: 20px; margin: 15px 0; }
        .modal li { margin-bottom: 5px; }
        .modal li.me { font-weight: bold; color: #dc3545; }
        .modal .close-btn {
            position: absolute; top: 10px; right: 15px;
            background: none; border: none;
            font-size: 1.5em; cursor: pointer; color: #999;
        }
        .modal .close-btn:hover { color: #333; }
        #username {
            width: 100%; padding: 10px; font-size: 1.2em;
            border: 1px solid #ccc; border-radius: 5px;
            margin-top: 10px;
        }
        #save-btn {
            margin-top: 15px; width: 100%; padding: 10px;
            background: #007bff; color: #fff; border: none;
            border-radius: 5px; font-size: 1.2em; cursor: pointer;
        }
        #save-btn:hover { background: #0056b3; }
        @keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }