
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #1a2980, #26d0ce);
            color: #333;
            min-height: 100vh;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        .container {
            width: 100%;
            max-width: 900px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }
        
        header {
            background: linear-gradient(90deg, #e74c3c, #c0392b);
            color: white;
            padding: 25px 30px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        footer {
            background: linear-gradient(to right, #2c3e50, #1a2530);
            color: #ecf0f1;
            text-align: center;
            padding: 20px;
            margin-top: 25px;
            border-radius: 0 0 10px 10px;
        }
        
        header h1 {
            font-size: 2.2rem;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
            position: relative;
            z-index: 2;
        }
        
        .subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
            margin-top: 10px;
            position: relative;
            z-index: 2;
        }
        
        .main-content {
            padding: 25px 30px 30px;
        }
        
        .simulation-box {
            background: linear-gradient(to bottom, #27ae60, #2ecc71);
            border-radius: 15px;
            padding: 20px;
            box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.3);
            margin-bottom: 25px;
            position: relative;
            overflow: hidden;
        }
        
        .simulation-area {
            position: relative;
            height: 180px;
            background: #1d8348;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }
        
        .road-line {
            position: absolute;
            left: 50%;
            top: 0;
            bottom: 0;
            width: 4px;
            margin-left: -2px;
            background: repeating-linear-gradient(
                to bottom,
                #fff,
                #fff 15px,
                transparent 15px,
                transparent 30px
            );
        }
        
        .start-point {
            position: absolute;
            top: 50%;
            width: 12px;
            height: 12px;
            transform: translateY(-50%);
            border-radius: 50%;
            background: #f1c40f;
            box-shadow: 0 0 0 4px rgba(241, 196, 15, 0.5);
        }
        
        .start-point-left {
            left: 25px;
        }
        
        .start-point-right {
            right: 25px;
        }
        
        .distance-meter {
            position: absolute;
            top: 15px;
            left: 0;
            right: 0;
            text-align: center;
            color: white;
            font-weight: bold;
            font-size: 1.1rem;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
            z-index: 5;
        }
        
        .car {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 65px;
            height: 40px;
            border-radius: 10px 5px 5px 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: white;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
            box-shadow: 0 4px 8px rgba(0,0,0,0.3);
            transition: left 0.05s linear;
            z-index: 10;
            padding-left: 10px;
        }
        
        .car::after {
            content: '';
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255,255,255,0.3);
            box-shadow: 0 0 5px rgba(0,0,0,0.3);
        }
        
        .car-red {
            background: linear-gradient(to right, #e74c3c, #c0392b);
            left: 30px;
        }
        
        .car-red::after {
            left: 8px;
        }
        
        .car-blue {
            background: linear-gradient(to right, #3498db, #2980b9);
            left: calc(100% - 105px);
            border-radius: 5px 10px 10px 5px;
            padding-left: 0;
            padding-right: 10px;
        }
        
        .car-blue::after {
            right: 8px;
        }
        
        .car-icon {
            font-size: 1.2rem;
            margin: 0 5px;
        }
        
        .meeting-point {
            position: absolute;
            top: 50%;
            width: 20px;
            height: 20px;
            transform: translate(-50%, -50%);
            border-radius: 50%;
            background: #f1c40f;
            box-shadow: 0 0 0 8px rgba(241, 196, 15, 0.3);
            display: none;
            z-index: 5;
        }
        
        .control-panel {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 25px;
            margin-bottom: 25px;
        }
        
        .slider-card {
            background: rgba(236, 240, 241, 0.7);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        
        .slider-title {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 15px;
            color: #2c3e50;
            font-weight: 700;
            font-size: 1.1rem;
        }
        
        .slider-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 0 10px;
        }
        
        .slider-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 600;
            color: #2c3e50;
            font-size: 1rem;
        }
        
        .slider-value {
            background: #34495e;
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-weight: 600;
            min-width: 70px;
            text-align: center;
        }
        
        input[type="range"] {
            width: 100%;
            height: 10px;
            border-radius: 5px;
            background: linear-gradient(to right, #16a085, #3498db);
            outline: none;
            -webkit-appearance: none;
            margin: 10px 0;
        }
        
        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: white;
            border: 3px solid #2980b9;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        }
        
        .button-group {
            display: flex;
            justify-content: center;
            gap: 25px;
            margin: 25px 0;
        }
        
        button {
            padding: 15px 35px;
            font-size: 1.1rem;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 12px;
            box-shadow: 0 6px 15px rgba(0,0,0,0.2);
        }
        
        .btn-start {
            background: linear-gradient(to right, #2ecc71, #27ae60);
            color: white;
        }
        
        .btn-reset {
            background: linear-gradient(to right, #e67e22, #d35400);
            color: white;
        }
        
        button:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 8px 18px rgba(0,0,0,0.3);
        }
        
        button:active {
            transform: translateY(2px);
            box-shadow: 0 3px 8px rgba(0,0,0,0.2);
        }
        
        .explanation {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        }
        
        .formula-box {
            text-align: center;
            margin: 25px 0;
            padding: 20px;
            background: linear-gradient(to right, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1));
            border-radius: 12px;
            border-left: 4px solid #2980b9;
        }
        
        .formula-title {
            font-size: 1.3rem;
            margin-bottom: 15px;
            color: #2c3e50;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
        }
        
        .formula-content {
            font-size: 1.9rem;
            color: #e74c3c;
            font-weight: 700;
            padding: 15px 0;
        }
        
        .formula-item {
            display: flex;
            align-items: center;
            gap: 15px;
            margin: 15px 0;
            padding: 15px 20px;
            background: rgba(26, 188, 156, 0.1);
            border-radius: 10px;
            font-size: 1.15rem;
        }
        
        .formula-value {
            background: #34495e;
            color: white;
            padding: 8px 15px;
            border-radius: 8px;
            min-width: 80px;
            text-align: center;
            font-weight: 700;
            flex-shrink: 0;
        }
        
        .calculation-steps {
            background: rgba(241, 196, 15, 0.08);
            padding: 20px 25px;
            border-radius: 12px;
            margin-top: 30px;
            border: 1px dashed #f1c40f;
        }
        
        .step {
            margin-bottom: 18px;
            padding-bottom: 18px;
            border-bottom: 1px dashed #bdc3c7;
            position: relative;
            padding-left: 45px;
        }
        
        .step:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }
        
        .step-number {
            position: absolute;
            left: 0;
            top: 0;
            width: 35px;
            height: 35px;
            background: #e74c3c;
            color: white;
            border-radius: 50%;
            text-align: center;
            line-height: 35px;
            font-weight: bold;
            font-size: 1.1rem;
        }
        
        .step-text {
            font-size: 1.15rem;
            line-height: 1.6;
        }
        
        .highlight {
            background: #f1c40f;
            padding: 3px 8px;
            border-radius: 5px;
            font-weight: 700;
            color: #2c3e50;
        }
        
        .meeting-calculation {
            display: none;
            margin-top: 30px;
        }
        
        @media (max-width: 768px) {
            .control-panel {
                grid-template-columns: 1fr;
            }
            .simulation-area {
                height: 150px;
            }
            .button-group {
                flex-direction: column;
                gap: 15px;
            }
            button {
                width: 100%;
                justify-content: center;
            }
        }
        
        @media (max-width: 480px) {
            header h1 {
                font-size: 1.8rem;
            }
            .subtitle {
                font-size: 1rem;
            }
            .car {
                width: 55px;
                font-size: 0.9rem;
            }
            .formula-content {
                font-size: 1.5rem;
            }
        }
