#puzzle-app-calculation{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
#puzzle-app-calculation *,#puzzle-app-calculation *::before,#puzzle-app-calculation *::after{box-sizing:border-box}
#puzzle-app-calculation *{
            box-sizing: border-box;
            font-family: 'Segoe UI', system-ui, sans-serif;
        }
        #puzzle-app-calculation{
            margin: 0;
            padding: 20px;
            min-height: 100vh;
            background: #f5f7fa;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #puzzle-app-calculation .container{
            background: white;
            border-radius: 16px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
            padding: 40px;
            width: 100%;
            max-width: 1000px;
            margin: 20px;
        }
        #puzzle-app-calculation h1{
            color: #2c3e50;
            text-align: center;
            margin-bottom: 10px;
            font-weight: 700;
            font-size: 2.2em;
        }
        #puzzle-app-calculation .subtitle{
            color: #7f8c8d;
            text-align: center;
            margin-bottom: 30px;
            font-size: 1.2em;
        }
        #puzzle-app-calculation .themes-menu{
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        #puzzle-app-calculation .theme-card{
            padding: 12px 20px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
            background: white;
            border: 2px solid #e0e6ed;
            font-weight: 600;
            color: #2c3e50;
        }
        #puzzle-app-calculation .theme-card:hover{
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        #puzzle-app-calculation .theme-card.active{
            border-color: #3498db;
            background: #f0f7ff;
        }
        #puzzle-app-calculation .levels-compact{
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 25px;
            flex-wrap: wrap;
        }
        #puzzle-app-calculation .level-compact{
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 12px 20px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
            background: white;
            border: 2px solid #e0e6ed;
            min-width: 100px;
            position: relative;
        }
        #puzzle-app-calculation .level-compact:hover{
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        #puzzle-app-calculation .level-compact.active{
            border-color: #3498db;
            background: #f0f7ff;
        }
        #puzzle-app-calculation .level-stars{
            font-size: 1.4em;
            font-weight: bold;
            margin-bottom: 5px;
            height: 30px;
        }
        #puzzle-app-calculation .level-name-compact{
            font-size: 0.95em;
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 3px;
        }
        #puzzle-app-calculation .level-stats-compact{
            font-size: 0.8em;
            color: #7f8c8d;
        }
        #puzzle-app-calculation .level-tooltip{
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: #2c3e50;
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 0.85em;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s;
            margin-bottom: 10px;
            z-index: 100;
        }
        #puzzle-app-calculation .level-compact:hover .level-tooltip{
            opacity: 1;
            visibility: visible;
        }
        #puzzle-app-calculation .level-tooltip:after{
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border-width: 5px;
            border-style: solid;
            border-color: #2c3e50 transparent transparent transparent;
        }
        #puzzle-app-calculation .task-display{
            background: #fff;
            border-radius: 16px;
            padding: 30px;
            text-align: center;
            margin-bottom: 30px;
            border: 2px solid #e0e6ed;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        }
        #puzzle-app-calculation .task-header{
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            flex-wrap: wrap;
            gap: 15px;
        }
        #puzzle-app-calculation .task-title{
            font-size: 1.2em;
            font-weight: 500;
            color: #7f8c8d;
            text-align: left;
            flex: 1;
        }
        #puzzle-app-calculation .new-task-btn{
            background: #3498db;
            color: white;
            border: none;
            border-radius: 10px;
            padding: 12px 24px;
            font-size: 1.1em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            white-space: nowrap;
        }
        #puzzle-app-calculation .new-task-btn:hover{
            background: #2980b9;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
        }
        #puzzle-app-calculation .task-example{
            font-size: 3em;
            font-weight: bold;
            margin: 20px 0;
            color: #3498db;
        }
        #puzzle-app-calculation .task-description{
            font-size: 1em;
            color: #7f8c8d;
            font-style: italic;
            margin-top: 10px;
        }
        #puzzle-app-calculation .input-group{
            margin-bottom: 20px;
            position: relative;
            max-width: 300px;
            margin-left: auto;
            margin-right: auto;
        }
        #puzzle-app-calculation .input-label{
            display: block;
            margin-bottom: 12px;
            color: #2c3e50;
            font-weight: 600;
            font-size: 1.1em;
        }
        #puzzle-app-calculation input{
            width: 100%;
            padding: 16px 20px;
            border: 2px solid #e0e6ed;
            border-radius: 12px;
            font-size: 1.2em;
            transition: all 0.3s;
            background: #f8fafc;
            text-align: center;
        }
        #puzzle-app-calculation input:focus{
            outline: none;
            border-color: #667eea;
            background: white;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
        }
        #puzzle-app-calculation .checkbox-group{
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 20px;
            margin: 20px 0;
        }
        #puzzle-app-calculation .checkbox-item{
            display: flex;
            align-items: center;
            gap: 8px;
            background: #f8fafc;
            padding: 10px 20px;
            border-radius: 30px;
            border: 2px solid #e0e6ed;
            cursor: pointer;
            transition: 0.2s;
        }
        #puzzle-app-calculation .checkbox-item:hover{
            background: #eef2f6;
        }
        #puzzle-app-calculation .checkbox-item input{
            width: 20px;
            height: 20px;
            cursor: pointer;
        }
        #puzzle-app-calculation .check-btn{
            width: 100%;
            padding: 18px;
            border: none;
            border-radius: 12px;
            font-size: 1.2em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            background: #2ecc71;
            color: white;
            margin-top: 20px;
        }
        #puzzle-app-calculation .check-btn:hover{
            background: #27ae60;
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        }
        #puzzle-app-calculation .result{
            margin-top: 30px;
            padding: 25px;
            border-radius: 12px;
            text-align: center;
            font-size: 1.3em;
            font-weight: 600;
            display: none;
            animation: calculation-fade-in 0.5s ease;
        }
        @keyframes calculation-fade-in{
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        #puzzle-app-calculation .success{
            background: #d5f4e6;
            color: #27ae60;
            border: 2px solid #2ecc71;
        }
        #puzzle-app-calculation .error{
            background: #ffeaea;
            color: #e74c3c;
            border: 2px solid #e74c3c;
        }
        #puzzle-app-calculation .stats{
            display: flex;
            justify-content: space-around;
            margin-top: 30px;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 12px;
            font-size: 1.1em;
            font-weight: 500;
        }
        #puzzle-app-calculation .stat-item{
            text-align: center;
        }
        #puzzle-app-calculation .stat-value{
            font-size: 1.8em;
            font-weight: 700;
            color: #667eea;
            display: block;
        }
        #puzzle-app-calculation .cache-control{
            text-align: center;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }
        #puzzle-app-calculation .clear-cache-btn{
            background: transparent;
            color: #95a5a6;
            border: 1px solid #ddd;
            padding: 8px 16px;
            font-size: 0.9em;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s;
        }
        #puzzle-app-calculation .clear-cache-btn:hover{
            background: #f8f9fa;
            color: #7f8c8d;
            border-color: #ccc;
        }
        #puzzle-app-calculation .cache-info{
            font-size: 0.8em;
            color: #bdc3c7;
            margin-top: 8px;
        }
        @media (max-width: 768px){#puzzle-app-calculation .container{ padding: 20px; }
            #puzzle-app-calculation .task-example{ font-size: 2.2em; }
            #puzzle-app-calculation .checkbox-group{ flex-direction: column; align-items: center; }}
        @media (max-width: 480px){
            #puzzle-app-calculation{padding:0;min-height:0}
            #puzzle-app-calculation .container{min-width:0;margin:0}
            #puzzle-app-calculation .task-header{flex-wrap:wrap;justify-content:center}
            #puzzle-app-calculation .stats{flex-wrap:wrap;gap:1rem}
            #puzzle-app-calculation .level-tooltip{display:none}
        }
