


        .timer-center {

            flex: 2;

            display: flex;

            flex-direction: column;

            align-items: center;

            gap: 25px;

        }



        .timer-container {

            position: relative;

            width: 100%;

            max-width: 420px;

            aspect-ratio: 1/1;

        }



        .timer-circle {

            position: relative;

            width: 100%;

            height: 100%;

            border-radius: 50%;

            background: conic-gradient(var(--primary) 0deg,

                    var(--primary) var(--progress, 0deg),

                    rgba(var(--muted-rgb), 0.1) var(--progress, 0deg),

                    rgba(var(--muted-rgb), 0.1) 360deg);

            box-shadow: 0 0 40px var(--shadow);

            display: flex;

            justify-content: center;

            align-items: center;

            transition: all 0.5s ease;

        }



        .timer-circle.accelerated {

            background: conic-gradient(var(--accent) 0deg,

                    var(--accent) var(--progress, 0deg),

                    rgba(var(--accent-rgb), 0.1) var(--progress, 0deg),

                    rgba(var(--accent-rgb), 0.1) 360deg);

            box-shadow: 0 0 50px var(--shadow);

        }



        .inner-circle {

            width: 70%;

            height: 70%;

            background: var(--inner-bg);

            border-radius: 50%;

            display: flex;

            flex-direction: column;

            justify-content: center;

            align-items: center;

            box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);

            position: relative;

            z-index: 2;

        }



        .current-seconds {

            font-size: 4.8rem;

            font-weight: 700;

            color: var(--text);

            text-shadow: 0 0 20px var(--shadow);

            margin-bottom: 8px;

            display: inline-block;

            min-width: 3.2ch;

            text-align: center;

            font-variant-numeric: tabular-nums;

            will-change: transform;

            transform: translateZ(0);

        }



        .cycle-text {

            font-size: 1.1rem;

            color: var(--text-muted);

        }



        .stats-container {

            width: 100%;

            max-width: 420px;

            display: flex;

            justify-content: space-around;

            background: var(--panel-bg);

            border-radius: 15px;

            padding: 20px;

            border: 1px solid var(--border);

        }



        .stat-box {

            text-align: center;

        }



        .stat-value {

            font-size: 2.3rem;

            font-weight: 700;

            color: var(--primary);

            margin-bottom: 4px;

        }



        .stat-label {

            font-size: 1rem;

            color: var(--text-muted);

        }



        .controls {

            display: flex;

            flex-wrap: wrap;

            justify-content: center;

            gap: 12px;

            width: 100%;

            max-width: 420px;

        }



        button {

            padding: 14px 28px;

            font-size: 1.05rem;

            background: rgba(var(--primary-rgb), 0.15);

            color: var(--text);

            border: 2px solid var(--primary);

            border-radius: 12px;

            cursor: pointer;

            transition: all 0.3s ease;

            display: flex;

            align-items: center;

            gap: 8px;

            font-weight: 600;

        }



        button:hover {

            background: rgba(var(--primary-rgb), 0.3);

            transform: translateY(-2px);

            box-shadow: 0 5px 20px var(--shadow);

        }



        button.reset {

            background: rgba(239, 68, 68, 0.15);

            border-color: #ef4444;

        }



        button.reset:hover {

            background: rgba(239, 68, 68, 0.3);

            box-shadow: 0 5px 20px rgba(239, 68, 68, 0.2);

        }



        .stats-page,

        .achievements-page,

        .settings-page {

            background: var(--card-bg);

            border-radius: 20px;

            padding: 35px;

            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);

            border: 1px solid var(--border);

        }



        .section-title {

            font-size: 1.9rem;

            margin-bottom: 25px;

            color: var(--primary);

            display: flex;

            align-items: center;

            gap: 12px;

            justify-content: center;

        }









        .achievements-grid {

            display: grid;

            grid-template-columns: repeat(auto-fill, minmax(100px, 150px));

            gap: 20px;

            padding: 15px 0;

            justify-content: center;

        }



        .achievement-item {

            background: rgba(var(--primary-rgb), 0.1);

            border: 2px solid rgba(var(--primary-rgb), 0.3);

            border-radius: 20px;

            padding: 25px 20px;

            text-align: center;

            transition: all 0.3s ease;

            position: relative;

            cursor: pointer;

            height: 150px;

            display: flex;

            flex-direction: column;

            align-items: center;

            justify-content: space-between;

            width: 100%;

            margin: 0 auto;

        }



        .achievement-item:hover {

            transform: translateY(-6px) scale(1.04);

            border-color: var(--primary);

            box-shadow: 0 12px 30px var(--shadow);

            background: rgba(var(--primary-rgb), 0.18);

        }



        .achievement-item.locked {

            opacity: 0.65;

            border-color: rgba(var(--muted-rgb), 0.4);

            background: rgba(var(--muted-rgb), 0.08);

        }



        .achievement-icon {

            font-size: 2.8rem;

            margin-bottom: 12px;

            transition: transform 0.3s ease;

        }



        .achievement-item:hover .achievement-icon {

            transform: scale(1.15);

        }



        .achievement-title {

            font-size: 1.05rem;

            font-weight: 600;

            line-height: 1.3;

            color: var(--text);

            min-height: 2.6em;

        }



        .achievement-tooltip {

            position: absolute;

            bottom: 100%;

            left: 50%;

            transform: translateX(-50%);

            background: rgba(15, 23, 42, 0.97);

            color: var(--text);

            padding: 12px 16px;

            border-radius: 10px;

            font-size: 0.95rem;

            width: 260px;

            text-align: left;

            line-height: 1.45;

            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);

            opacity: 0;

            visibility: hidden;

            transition: all 0.25s ease;

            pointer-events: none;

            z-index: 100;

            margin-bottom: 12px;

            white-space: normal;

        }



        .achievement-item:hover .achievement-tooltip {

            opacity: 1;

            visibility: visible;

            bottom: calc(100% + 10px);

        }



        .achievement-tooltip::after {

            content: '';

            position: absolute;

            top: 100%;

            left: 50%;

            margin-left: -6px;

            border: 6px solid transparent;

            border-top-color: rgba(15, 23, 42, 0.97);

        }



        .achievements-grid::-webkit-scrollbar {

            height: 6px;

        }



        .achievements-grid::-webkit-scrollbar-track {

            background: rgba(15, 23, 42, 0.6);

            border-radius: 10px;

        }



        .achievements-grid::-webkit-scrollbar-thumb {

            background: var(--primary);

            border-radius: 10px;

        }



        .achievements-grid::-webkit-scrollbar-thumb:hover {

            background: var(--primary-dark);

        }



        .achievement-item.completed {

            border-color: var(--accent);

            background: rgba(245, 158, 11, 0.1);

        }



        .achievement-item.active {

            border-color: var(--primary);

            background: rgba(56, 189, 248, 0.1);

            animation: challengePulse 2s infinite;

        }



        @keyframes challengePulse {



            0%,

            100% {

                box-shadow: 0 0 15px var(--shadow);

            }



            50% {

                box-shadow: 0 0 25px var(--shadow);

            }

        }



        .btn-challenge-start,

        .btn-challenge-abandon {

            background: var(--primary);

            color: white;

            border: none;

            padding: 8px 16px;

            border-radius: 8px;

            font-weight: bold;

            cursor: pointer;

            margin-top: 10px;

            transition: 0.3s;

        }



        .btn-challenge-start:hover {

            background: var(--primary-dark);

            transform: scale(1.05);

        }



        .btn-challenge-abandon {

            background: rgba(239, 68, 68, 0.8);

        }



        .btn-challenge-abandon:hover {

            background: rgba(239, 68, 68, 1);

        }



        .challenge-mode-panel {

            background: rgba(var(--primary-rgb), 0.1);

            border: 2px solid var(--primary);

            border-radius: 15px;

            padding: 20px;

            margin-bottom: 30px;

        }



        .challenge-mode-header {

            display: flex;

            justify-content: space-between;

            align-items: center;

            margin-bottom: 15px;

        }



        .challenge-mode-header h3 {

            color: var(--primary);

            margin: 0;

        }



        .challenge-timer {

            font-size: 1.2rem;

            font-weight: bold;

            color: var(--accent);

        }



        .challenge-progress {

            margin-bottom: 15px;

        }



        .progress-bar {

            width: 100%;

            height: 20px;

            background: rgba(var(--muted-rgb), 0.3);

            border-radius: 10px;

            overflow: hidden;

            margin-bottom: 5px;

        }



        .progress-fill {

            height: 100%;

            background: linear-gradient(90deg, var(--primary), var(--accent));

            transition: width 0.3s ease;

        }



        .progress-text {

            text-align: center;

            font-weight: bold;

            color: var(--text);

        }



        .challenge-controls {

            text-align: center;

        }



        .btn-challenge-exit {

            background: rgba(239, 68, 68, 0.8);

            color: white;

            border: none;

            padding: 12px 24px;

            border-radius: 25px;

            font-weight: bold;

            cursor: pointer;

            transition: 0.3s;

        }



        .btn-challenge-exit:hover {

            background: rgba(239, 68, 68, 1);

            transform: scale(1.05);

        }



        .challenge-entry-panel {

            text-align: center;

            margin-bottom: 30px;

        }



        .challenge-intro {

            background: rgba(var(--primary-rgb), 0.05);

            border: 1px solid rgba(var(--primary-rgb), 0.2);

            border-radius: 15px;

            padding: 25px;

        }



        .challenge-intro h3 {

            color: var(--primary);

            margin-bottom: 15px;

        }



        .challenge-intro p {

            color: var(--text-muted);

            margin-bottom: 20px;

            line-height: 1.6;

        }



        .challenge-rules {

            text-align: left;

            background: rgba(var(--muted-rgb), 0.1);

            border-radius: 10px;

            padding: 15px;

            margin-bottom: 20px;

        }



        .challenge-rules h4 {

            color: var(--accent);

            margin-bottom: 10px;

        }



        .challenge-rules ul {

            color: var(--text-muted);

            padding-left: 20px;

        }



        .challenge-rules li {

            margin-bottom: 5px;

        }



        .btn-enter-challenge {

            background: var(--primary);

            color: white;

            border: none;

            padding: 15px 30px;

            border-radius: 25px;

            font-size: 1.1rem;

            font-weight: bold;

            cursor: pointer;

            transition: 0.3s;

        }



        .btn-enter-challenge:hover {

            background: var(--primary-dark);

            transform: scale(1.05);

            box-shadow: 0 5px 20px var(--shadow);

        }



        .challenges-grid {

            display: grid;

            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));

            gap: 20px;

            padding: 15px 0;

        }



        .challenge-card {

            background: rgba(var(--primary-rgb), 0.08);

            border: 2px solid rgba(var(--primary-rgb), 0.2);

            border-radius: 15px;

            padding: 20px;

            text-align: center;

            transition: all 0.3s ease;

            cursor: pointer;

        }



        .challenge-card:hover {

            transform: translateY(-5px);

            border-color: var(--primary);

            box-shadow: 0 10px 30px var(--shadow);

        }



        .challenge-card.completed {

            border-color: var(--accent);

            background: rgba(245, 158, 11, 0.1);

        }



        .challenge-card.active {

            border-color: var(--primary);

            background: rgba(56, 189, 248, 0.1);

            animation: challengePulse 2s infinite;

        }



        .challenge-icon {

            font-size: 3rem;

            margin-bottom: 15px;

            color: var(--primary);

        }



        .challenge-title {

            font-size: 1.3rem;

            font-weight: bold;

            color: var(--text);

            margin-bottom: 10px;

        }



        .challenge-desc {

            color: var(--text-muted);

            margin-bottom: 15px;

            line-height: 1.5;

        }



        .challenge-reward {

            color: var(--accent);

            font-weight: bold;

            margin-bottom: 15px;

        }



        .challenge-time-limit {

            color: var(--text-muted);

            font-size: 0.9rem;

            margin-bottom: 15px;

        }



        .btn-start-challenge {

            background: var(--primary);

            color: white;

            border: none;

            padding: 10px 20px;

            border-radius: 20px;

            font-weight: bold;

            cursor: pointer;

            transition: 0.3s;

        }



        .btn-start-challenge:hover {

            background: var(--primary-dark);

            transform: scale(1.05);

        }



        .btn-start-challenge:disabled {

            background: rgba(var(--muted-rgb), 0.5);

            cursor: not-allowed;

            transform: none;

        }



        .about-button {

            border: 1px solid rgba(var(--primary-rgb), 0.25);

            background: rgba(var(--primary-rgb), 0.08);

            color: var(--text);

            border-radius: 999px;

            padding: 8px 16px;

            font-size: 0.95rem;

            cursor: pointer;

            transition: all 0.25s ease;

            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);

        }



        .about-button:hover {

            background: rgba(var(--primary-rgb), 0.16);

            transform: translateY(-1px);

        }



        .modal-overlay {

            position: fixed;

            inset: 0;

            background: rgba(0, 0, 0, 0.7);

            display: flex;

            align-items: center;

            justify-content: center;

            opacity: 0;

            pointer-events: none;

            transition: opacity 0.2s ease;

            z-index: 999;

        }



        .modal-overlay.visible {

            opacity: 1;

            pointer-events: auto;

        }



        .about-modal {

            width: min(620px, calc(100% - 40px));

            background: rgba(15, 23, 42, 0.98);

            border-radius: 24px;

            border: 1px solid rgba(var(--primary-rgb), 0.35);

            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);

            padding: 28px 30px;

            position: relative;

        }



        .about-modal h3 {

            font-size: 1.75rem;

            margin-bottom: 14px;

            color: var(--primary);

        }



        .about-modal p {

            color: var(--text-muted);

            line-height: 1.8;

            margin-bottom: 14px;

        }



        .about-modal .modal-list p {

            margin-bottom: 10px;

        }



        .close-modal {

            position: absolute;

            top: 18px;

            right: 18px;

            width: 36px;

            height: 36px;

            background: rgba(var(--primary-rgb), 0.12);

            border: none;

            border-radius: 50%;

            color: var(--text);

            font-size: 1.2rem;

            line-height: 1;

            cursor: pointer;

            display: flex;

            align-items: center;

            justify-content: center;

            text-align: center;

            padding: 0;

        }



        #upgradesGrid {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));

            gap: 22px;

            max-width: 1120px;

            margin: 30px auto;

            padding: 0 10px;

        }



        #upgradesGrid .upgrade-item {

            background: rgba(var(--primary-rgb), 0.08);

            border: 1px solid rgba(var(--primary-rgb), 0.2);

            border-radius: 20px;

            padding: 24px 22px;

            display: flex;

            flex-direction: column;

            justify-content: space-between;

            min-height: 210px;

            transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;

            box-shadow: inset 0 0 0 rgba(0, 0, 0, 0);

        }



        #upgradesGrid .upgrade-item:hover {

            transform: translateY(-6px);

            border-color: var(--primary);

            box-shadow: 0 18px 45px rgba(var(--primary-rgb), 0.12);

        }



        #upgradesGrid .upgrade-item.disabled {

            opacity: 0.72;

        }



        #upgradesGrid .upgrade-item.locked {

            border-color: rgba(255, 165, 0, 0.35);

            background: rgba(255, 165, 0, 0.08);

        }



        .upgrade-header {

            display: flex;

            justify-content: space-between;

            align-items: flex-start;

            gap: 10px;

            margin-bottom: 16px;

            flex-wrap: wrap;

        }



        .upgrade-name {

            font-size: 1.15rem;

            font-weight: 700;

            color: var(--text);

            line-height: 1.2;

        }



        .upgrade-level {

            font-size: 0.98rem;

            color: var(--accent);

            font-weight: 700;

            white-space: nowrap;

        }



        .upgrade-desc {

            color: var(--text-muted);

            line-height: 1.7;

            margin-bottom: 14px;

            min-height: 3.4em;

        }



        .upgrade-effect {

            color: var(--text);

            font-weight: 600;

            margin-bottom: 20px;

        }



        .btn-upgrade {

            width: 100%;

            background: var(--primary);

            color: white;

            border: none;

            padding: 12px 0;

            border-radius: 18px;

            font-weight: bold;

            cursor: pointer;

            transition: all 0.2s ease;

            min-width: 140px;

        }



        .btn-upgrade:hover {

            filter: brightness(1.05);

            box-shadow: 0 0 18px rgba(var(--primary-rgb), 0.35);

        }



        .btn-upgrade:disabled {

            background: #475569;

            color: #cbd5e1;

            cursor: not-allowed;

            box-shadow: none;

            filter: none;

        }



        .btn-upgrade:active {

            transform: scale(0.98);

        }



        .upgrade-sub-nav {

            display: flex;

            justify-content: center;

            gap: 15px;

            margin-bottom: 30px;

            border-bottom: 2px solid rgba(var(--primary-rgb), 0.15);

            flex-wrap: wrap;

        }



        .upgrade-sub-btn {

            padding: 12px 24px;

            font-size: 1rem;

            font-weight: 600;

            background: transparent;

            color: var(--text);

            border: none;

            border-radius: 10px 10px 0 0;

            cursor: pointer;

            transition: all 0.3s ease;

            display: flex;

            align-items: center;

            gap: 8px;

        }



        .upgrade-sub-btn:hover {

            background: rgba(var(--primary-rgb), 0.15);

            color: var(--primary);

        }



        .upgrade-sub-btn.active {

            background: rgba(var(--primary-rgb), 0.25);

            color: var(--primary);

            box-shadow: 0 4px 15px var(--shadow);

        }



        .upgrade-sub-btn i {

            font-size: 1.1rem;

        }



        .upgrades-list {

            display: flex;

            flex-direction: column;

            gap: 12px;

            padding: 10px 0;

            max-width: 200px;

            margin: 0 auto;

        }



        .upgrade-card {

            background: rgba(var(--primary-rgb), 0.08);

            border: 1px solid rgba(var(--primary-rgb), 0.2);

            border-radius: 12px;

            padding: 15px 20px;

            display: flex;

            align-items: center;

            justify-content: space-between;

            transition: all 0.2s ease;

        }



        .upgrade-card:hover {

            background: rgba(var(--primary-rgb), 0.15);

            border-color: var(--primary);

            transform: translateX(5px);

        }



        .btn-upgrade-action {

            background: var(--primary);

            color: white;

            border: none;

            padding: 12px 40px;

            border-radius: 25px;

            font-weight: bold;

            font-size: 1.05rem;

            cursor: pointer;

            margin-top: 15px;

            box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);

        }



        .upgrade-info {

            flex: 1;

            text-align: left;

        }



        .upgrade-name {

            font-size: 1.1rem;

            font-weight: bold;

            color: var(--text);

            margin-bottom: 4px;

        }



        .upgrade-desc {

            font-size: 0.85rem;

            color: var(--text-muted);

        }



        .upgrade-action {

            text-align: right;

            margin-left: 20px;

        }



        .btn-upgrade {

            background: var(--primary);

            color: white;

            border: none;

            padding: 8px 16px;

            border-radius: 8px;

            font-weight: bold;

            cursor: pointer;

            transition: 0.2s;

            min-width: 100px;

        }



        .btn-upgrade:hover {

            filter: brightness(1.1);

            box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4);

        }



        .btn-upgrade:active {

            transform: scale(0.95);

        }



        .stats-detail p {

            font-size: 1.15rem;

            margin: 16px 0;

            padding-bottom: 12px;

            border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);

        }



        .stats-detail p:last-child {

            border-bottom: none;

        }



        .stats-detail strong {

            color: var(--primary);

        }



        .stats-grid {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));

            gap: 16px;

            align-items: stretch;

            margin-top: 20px;

        }



        .stat-card {

            background: rgba(var(--primary-rgb), 0.08);

            border: 1px solid rgba(var(--primary-rgb), 0.18);

            border-radius: 18px;

            padding: 22px 18px;

            display: flex;

            flex-direction: column;

            justify-content: space-between;

            min-height: 100px;

            box-shadow: 0 16px 35px rgba(0, 0, 0, 0.1);

            transition: transform 0.2s ease, box-shadow 0.2s ease;

        }



        .stat-card:hover {

            transform: translateY(-4px);

            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);

        }



        .stat-label {

            color: var(--text-muted);

            font-size: 0.95rem;

            margin-bottom: 10px;

        }



        .stat-value {

            color: var(--text);

            font-size: 1.35rem;

            font-weight: 700;

            word-break: break-word;

        }



        .particles {

            position: absolute;

            top: 0;

            left: 0;

            width: 100%;

            height: 100%;

            pointer-events: none;

            z-index: 1;

        }



        .particle {

            position: absolute;

            border-radius: 50%;

            background: var(--primary);

            opacity: 0;

        }



        .accelerated .particle {

            background: var(--accent);

        }



        @keyframes pulse {

            0% {

                transform: scale(1);

            }



            50% {

                transform: scale(1.08);

            }



            100% {

                transform: scale(1);

            }

        }



        .pulse {

            animation: pulse 0.4s ease;

        }



        .timer-circle {

            animation: glow 3s infinite ease-in-out;

        }



        .timer-circle.accelerated {

            animation: none;

        }



        @keyframes glow {

            0% {

                box-shadow: 0 0 15px var(--shadow);

            }



            50% {

                box-shadow: 0 0 35px var(--shadow);

            }



            100% {

                box-shadow: 0 0 15px var(--shadow);

            }

        }



        #timerCircle,

        #timerCircle *,

        .current-seconds,

        .cycle-text,

        .stat-value,

        .stat-label {

            -webkit-user-select: none;

            -moz-user-select: none;

            -ms-user-select: none;

            user-select: none;

        }



        button,

        button * {

            user-select: text;

        }



        footer {

            text-align: center;

            margin-top: 60px;

            color: #64748b;

            font-size: 0.95rem;

            padding-top: 20px;

            border-top: 1px solid rgba(var(--primary-rgb), 0.1);

        }



        .settings-page {

            max-width: 720px;

            margin: 0 auto;

        }



        .setting-group {

            margin-bottom: 40px;

        }



        .setting-group h3 {

            color: var(--primary);

            margin-bottom: 16px;

            font-size: 1.35rem;

        }



        .setting-btn {

            padding: 14px 28px;

            font-size: 1.1rem;

            margin-right: 12px;

            margin-bottom: 12px;

            border-radius: 12px;

            cursor: pointer;

            transition: all 0.3s ease;

            font-weight: 600;

        }



        .reset-btn {

            background: rgba(234, 179, 8, 0.15);

            border: 2px solid #eab308;

            color: #fef08c;

        }



        .reset-btn:hover {

            background: rgba(234, 179, 8, 0.3);

            transform: translateY(-2px);

        }



        .danger-btn {

            background: rgba(239, 68, 68, 0.15);

            border: 2px solid #ef4444;

            color: #fda4af;

        }



        .danger-btn:hover {

            background: rgba(239, 68, 68, 0.3);

            transform: translateY(-2px);

        }



        .settings-row {

            display: flex;

            gap: 12px;

            flex-wrap: wrap;

        }



        .setting-desc {

            color: var(--text-muted);

            font-size: 0.95rem;

            margin-top: 8px;

            line-height: 1.5;

        }



        .rebirth-panel {

            margin-bottom: 24px;

            padding: 24px;

            background: var(--card-bg);

            border: 1px solid rgba(var(--primary-rgb), 0.18);

            border-radius: 24px;

            display: grid;

            gap: 22px;

            max-width: 1120px;

            margin: 0 auto 24px;

        }



        .rebirth-metrics {

            display: grid;

            grid-template-columns: repeat(4, minmax(180px, 1fr));

            gap: 18px;

        }



        .rebirth-sdv-panel {

            background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--accent-rgb), 0.08));

            border-color: rgba(var(--accent-rgb), 0.22);

        }



        .rebirth-sdv-metrics {

            grid-template-columns: repeat(2, minmax(180px, 1fr));

        }



        .challenge-card.locked {

            opacity: 0.7;

            cursor: default;

            filter: grayscale(10%);

        }



        .challenge-card-actions {

            display: flex;

            justify-content: center;

            gap: 12px;

            flex-wrap: wrap;

            margin-top: 10px;

        }



        .challenge-progress-bar {

            width: 100%;

            height: 10px;

            background: rgba(var(--muted-rgb), 0.15);

            border-radius: 999px;

            overflow: hidden;

            margin: 12px 0 6px;

        }



        .challenge-progress-fill {

            height: 100%;

            background: linear-gradient(90deg, var(--primary), var(--accent));

            width: 0;

            transition: width 0.3s ease;

        }



        .challenge-progress-text {

            color: var(--text-muted);

            font-size: 0.95rem;

        }



        .rebirth-stat-item {

            background: rgba(var(--primary-rgb), 0.08);

            border: 1px solid rgba(var(--primary-rgb), 0.2);

            border-radius: 18px;

            padding: 18px 16px;

            display: flex;

            flex-direction: column;

            gap: 8px;

            min-height: 100px;

            justify-content: center;

        }



        .rebirth-stat-label {

            color: var(--text-muted);

            font-size: 0.95rem;

        }



        .rebirth-stat-value {

            color: var(--text);

            font-size: 1.75rem;

            font-weight: 700;

        }



        .rebirth-panel .rebirth-actions {

            display: flex;

            gap: 14px;

            flex-wrap: wrap;

            justify-content: center;

        }



        .rebirth-panel .rebirth-actions .setting-btn {

            min-width: 220px;

            flex: 1 1 220px;

        }



        .rebirth-panel .setting-desc {

            text-align: center;

            margin-top: 0;

        }



        @media (max-width: 900px) {

            .rebirth-metrics {

                grid-template-columns: repeat(2, minmax(140px, 1fr));

            }

        }



        @media (max-width: 620px) {

            .rebirth-metrics {

                grid-template-columns: 1fr;

            }

        }



        @media (max-width: 760px) {

            header {

                display: flex;

                flex-direction: column;

                align-items: center;

                gap: 12px;

                padding-top: 20px;

            }



            h1 {

                font-size: 2.4rem;

            }



            .header-meta {

                justify-content: center;

            }



            .about-button {

                position: static;

                padding: 8px 14px;

                font-size: 0.9rem;

                box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);

            }



            .tab-nav {

                gap: 8px;

            }



            .tab-btn,

            .upgrade-sub-btn {

                padding: 10px 14px;

                font-size: 0.92rem;

                flex: 1 1 30%;

                min-width: 100px;

            }



            #upgradesGrid,

            .achievements-grid,

            .challenges-grid,

            .rebirth-metrics {

                gap: 14px;

            }



            .upgrade-item,

            .achievement-item,

            .challenge-card {

                padding: 18px 16px;

                min-height: auto;

            }



            .upgrade-header {

                flex-direction: column;

                align-items: flex-start;

            }



            .upgrade-action,

            .controls,

            .rebirth-actions {

                flex-direction: column;

                align-items: stretch;

            }



            .upgrade-card {

                flex-direction: column;

                gap: 12px;

            }



            .btn-upgrade,

            .setting-btn,

            .btn-challenge-start,

            .btn-challenge-abandon,

            .btn-enter-challenge {

                width: 100%;

            }

        }



        .subtitle a:hover,

        footer a:hover {

            opacity: 1;

            text-decoration: underline;

        }



        .theme-selector-container {

            position: relative;

            display: inline-block;

            width: 150px;

        }



        .theme-trigger-btn {

            width: 100%;

            justify-content: space-between;

            margin-bottom: 0;

        }



        .theme-options-menu {

            display: none;

            position: absolute;

            top: 105%;

            left: 0;

            width: 100%;

            flex-direction: column;

            gap: 4px;

            background: var(--card-bg);

            border: 1px solid var(--border);

            padding: 8px;

            border-radius: 12px;

            z-index: 100;

            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);

        }



        .theme-options-menu.active {

            display: flex;

        }



        .theme-option-item {

            width: 100%;

            margin: 0;

            text-align: center;

            border: none;

            background: transparent;

        }



        .theme-option-item:hover {

            background: rgba(var(--primary-rgb), 0.1);

        }



        .theme-selector-wrapper {

            position: relative;

            display: inline-block;

            min-width: 160px;

        }



        .theme-dropdown-menu {

            display: none;

            position: absolute;

            top: 100%;

            left: 0;

            width: 100%;

            background: var(--card-bg);

            border: 1px solid var(--border);

            border-radius: 12px;

            flex-direction: column;

            gap: 5px;

            padding: 10px;

            z-index: 100;

            margin-top: 5px;

            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);

        }



        .theme-dropdown-menu.active {

            display: flex;

            animation: fadeIn 0.2s ease;

        }



        .theme-option {

            width: 100%;

            margin: 0;

            border: 1px solid transparent;

            justify-content: center;

        }



        .theme-option:hover {

            background: rgba(var(--primary-rgb), 0.2);

            border-color: var(--primary);

        }



        .lang-grid {

            display: grid;

            grid-template-columns: repeat(3, 1fr);

            gap: 12px;

        }



        .lang-btn {

            margin: 0;

            text-align: center;

            justify-content: center;

            white-space: nowrap;

            padding: 12px 16px;

        }



        .lang-btn {

            margin-right: 0;

            margin-bottom: 0;

        }



        @media (max-width: 600px) {

            .lang-grid {

                grid-template-columns: repeat(2, 1fr);

            }

        }



        .settings-layout-switcher {

            display: flex;

            justify-content: center;

            gap: 12px;

            margin-bottom: 25px;

        }



        .layout-switch-btn {

            background: transparent;

            border: 2px solid var(--border);

            color: var(--text-muted);

            padding: 10px 16px;

            border-radius: 12px;

            font-size: 1.1rem;

            cursor: pointer;

            transition: 0.25s;

        }



        .layout-switch-btn.active,

        .layout-switch-btn:hover {

            background: rgba(var(--primary-rgb), 0.15);

            color: var(--primary);

            border-color: var(--primary);

        }



        .settings-grid-cards .settings-card-group {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));

            gap: 22px;

            max-width: 1000px;

            margin: 0 auto;

        }



        .setting-card {

            background: var(--card-bg);

            border: 1px solid var(--border);

            border-radius: 20px;

            padding: 24px;

            text-align: center;

            transition: 0.3s;

            box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.05);

        }



        .setting-card:hover {

            border-color: var(--primary);

            box-shadow: 0 0 30px var(--shadow);

        }



        .danger-card {

            border-color: rgba(239, 68, 68, 0.3);

        }



        .danger-card:hover {

            border-color: #ef4444;

            box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);

        }



        .setting-card-icon {

            font-size: 2.5rem;

            color: var(--primary);

            margin-bottom: 10px;

        }



        .setting-card h3 {

            color: var(--text);

            margin-bottom: 15px;

            font-size: 1.3rem;

        }



        .setting-card-actions {

            display: flex;

            justify-content: center;

            gap: 10px;

            flex-wrap: wrap;

            margin: 15px 0;

        }



        .settings-sidebar-layout .settings-container {

            display: flex;

            gap: 28px;

            max-width: 1000px;

            margin: 0 auto;

            align-items: flex-start;

        }



        .settings-sidebar {

            flex: 0 0 20px;

            display: flex;

            flex-direction: column;

            gap: 8px;

            background: var(--panel-bg);

            border-radius: 16px;

            padding: 16px;

            border: 1px solid var(--border);

        }



        .sidebar-item {

            background: transparent;

            color: var(--text-muted);

            border: none;

            padding: 12px 16px;

            text-align: left;

            border-radius: 10px;

            cursor: pointer;

            font-size: 1rem;

            transition: 0.2s;

            width: 100%;

        }



        .sidebar-item i {

            margin-right: 8px;

        }



        .sidebar-item.active,

        .sidebar-item:hover {

            background: rgba(var(--primary-rgb), 0.15);

            color: var(--primary);

        }



        .settings-content {

            flex: 1;

            background: var(--card-bg);

            border-radius: 20px;

            padding: 30px;

            position: relative;

            border: 1px solid var(--border);

            min-height: 0px;

        }



        .settings-panel {

            display: none;

        }



        .settings-panel.active {

            display: block;

        }



        .danger-zone {

            border: 1px dashed rgba(239, 68, 68, 0.4);

            padding: 20px;

            border-radius: 12px;

        }



        @media (max-width: 768px) {

            .settings-sidebar-layout .settings-container {

                flex-direction: column;

            }



            .settings-sidebar {

                flex-direction: row;

                flex-wrap: wrap;

                justify-content: center;

            }



            .sidebar-item {

                width: auto;

                flex: 1 1 auto;

            }

        }



        @keyframes fadeOutSettings {

            from {

                opacity: 1;

                transform: translateY(0);

            }



            to {

                opacity: 0;

                transform: translateY(8px);

            }

        }



        @keyframes fadeInSettings {

            from {

                opacity: 0;

                transform: translateY(8px);

            }



            to {

                opacity: 1;

                transform: translateY(0);

            }

        }



        #settings-content-wrapper {

            animation-fill-mode: forwards;

        }



        @media (max-width: 600px) {

            .settings-grid-cards .settings-card-group {

                grid-template-columns: 1fr 1fr;

                gap: 8px;

            }



            .setting-card {

                padding: 11px 9px;

                border-radius: 13px;

            }



            .setting-card-icon {

                font-size: 1.4rem;

                margin-bottom: 5px;

            }



            .setting-card h3 {

                font-size: 0.9rem;

                margin-bottom: 7px;

            }



            .setting-card-actions {

                gap: 5px;

                margin: 10px 0;

                flex-wrap: wrap;

            }



            .setting-card-actions .setting-btn {

                padding: 7px 11px;

                font-size: 0.78rem;

                border-radius: 9px;

                margin: 0;

                width: 100%;

            }



            .setting-desc {

                font-size: 0.72rem;

                margin-top: 5px;

                line-height: 1.3;

            }



            .danger-card .setting-card-actions .setting-btn {

                width: auto;

                padding: 7px 15px;

            }

        }



        .settings-panel {

            position: absolute;

            top: 0;

            left: 0;

            width: 100%;

            opacity: 0;

            pointer-events: none;

            transition: opacity 0.25s ease;

        }



        .settings-panel.active {

            position: relative;

            opacity: 1;

            pointer-events: auto;

        }



        .custom-color-group {

            display: flex;

            flex-direction: column;

            gap: 12px;

            margin: 20px 0;

        }



        .custom-color-row {

            display: flex;

            align-items: center;

            gap: 10px;

            justify-content: space-between;

        }



        .custom-color-row label {

            color: var(--text);

            font-weight: 600;

            flex: 1;

        }



        .custom-color-row input[type="color"] {

            width: 40px;

            height: 40px;

            border: 2px solid var(--border);

            border-radius: 8px;

            background: transparent;

            cursor: pointer;

            padding: 2px;

        }



        .custom-color-row input[type="color"]::-webkit-color-swatch-wrapper {

            padding: 0;

        }



        .custom-color-row input[type="color"]::-webkit-color-swatch {

            border: none;

            border-radius: 6px;

        }

