* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Comic Sans MS', cursive, sans-serif;
            background: linear-gradient(135deg, #e3f6ff 0%, #b3e6fc 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            padding-top: 0 !important;
        }

        .title {
            color: #2E8B57;
            font-size: 2.5em;
            margin-bottom: 20px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .control-panel1 {
            background: rgba(255, 255, 255, 0.9);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            align-items: center;
            justify-content: center;
        }
          .control-panel2 {
            background: rgba(255, 255, 255, 0.9);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            align-items: center;
            justify-content: center;
        }


        .team-controls {
            display: flex;
            gap: 20px;
        }

        .team-section {
            border: 2px solid #4169E1;
            border-radius: 10px;
            padding: 15px;
            background: rgba(65, 105, 225, 0.1);
        }

        .team-section.team-b {
            border-color: #DC143C;
            background: rgba(220, 20, 60, 0.1);
        }

        .team-section h3 {
            color: #4169E1;
            margin-bottom: 10px;
        }

        .team-section.team-b h3 {
            color: #DC143C;
        }

        .input-group {
            display: flex;
            gap: 10px;
            margin-bottom: 10px;
            align-items: center;
        }

        .input-group label {
            font-weight: bold;
            min-width: 60px;
        }

        .input-group input {
            padding: 5px;
            border: 2px solid #ddd;
            border-radius: 5px;
            width: 100px;
        }

        .button {
            background: linear-gradient(45deg, #4CAF50, #45a049);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 25px;
            cursor: pointer;
            font-weight: bold;
            font-size: 14px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        .button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.3);
        }

        .button.remove {
            background: linear-gradient(45deg, #f44336, #d32f2f);
        }

        .button.start {
            background: linear-gradient(45deg, #FF6B35, #F7931E);
            font-size: 16px;
            padding: 12px 24px;
        }

        .button.reset {
            background: linear-gradient(45deg, #9C27B0, #7B1FA2);
            font-size: 16px;
            padding: 12px 24px;
        }

        .game-area {
            background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 50%, #90EE90 100%);
            border: 3px solid #654321;
            border-radius: 15px;
            width: 100%;
            max-width: 1500px;
            height: 500px;
            position: relative;
            overflow: hidden;
            box-shadow: 0 8px 16px rgba(0,0,0,0.3);
        }

        .grass-texture {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 100px;
            background: repeating-linear-gradient(
                90deg,
                #228B22 0px,
                #32CD32 2px,
                #228B22 4px
            );
            opacity: 0.3;
        }

        .center-line {
            position: absolute;
            left: 50%;
            top: 0;
            bottom: 0;
            width: 4px;
            background: linear-gradient(to bottom, #FFD700 0%, #FFA500 100%);
            transform: translateX(-50%);
            box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
        }

        .rope {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 300px;
            height: 20px;
            background: linear-gradient(45deg, #8B4513 0%, #D2691E  25%, #8B4513 50%, #D2691E 75%, #8B4513 100%);
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.3);
            transition: all 0.3s ease;
        }

        .rope::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: repeating-linear-gradient(
                90deg,
                transparent 0px,
                rgba(139, 69, 19, 0.8) 2px,
                transparent 4px
            );
            border-radius: 10px;
        }

        .character {
            position: absolute;
            width: 60px;
            height: 80px;
            transition: all 0.5s ease;
            cursor: pointer;
        }

        .character-body {
            width: 100%;
            height: 100%;
            position: relative;
        }

        .head {
            width: 35px;
            height: 35px;
            background: #FDBCB4;
            border-radius: 50%;
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            border: 2px solid #000;
        }

        .face {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .eyes {
            width: 4px;
            height: 4px;
            background: #000;
            border-radius: 50%;
            position: absolute;
            top: -2px;
        }

        .eyes.left { left: -6px; }
        .eyes.right { right: -6px; }

        .mouth {
            width: 8px;
            height: 4px;
            background: #000;
            border-radius: 0 0 8px 8px;
            position: absolute;
            top: 4px;
            left: 50%;
            transform: translateX(-50%);
        }

        .body {
            width: 30px;
            height: 35px;
            background: #4169E1;
            position: absolute;
            top: 30px;
            left: 50%;
            transform: translateX(-50%);
            border-radius: 5px;
            border: 2px solid #000;
        }

        .team-b .body {
            background: #DC143C;
        }

        .arms {
            width: 50px;
            height: 8px;
            background: #FDBCB4;
            position: absolute;
            top: 40px;
            left: 50%;
            transform: translateX(-50%);
            border-radius: 4px;
            border: 1px solid #000;
        }

        .legs {
            width: 25px;
            height: 20px;
            background: #4169E1;
            position: absolute;
            top: 60px;
            left: 50%;
            transform: translateX(-50%);
            border-radius: 0 0 5px 5px;
            border: 2px solid #000;
        }

        .team-b .legs {
            background: #DC143C;
        }

        .force-arrow {
            position: absolute;
            top: 50%;
            width: 0;
            height: 0;
            transition: all 0.3s ease;
        }

        .force-arrow.left {
            left: -30px;
            border-top: 8px solid transparent;
            border-bottom: 8px solid transparent;
            border-right: 20px solid #FF4500;
        }

        .force-arrow.right {
            right: -30px;
            border-top: 8px solid transparent;
            border-bottom: 8px solid transparent;
            border-left: 20px solid #FF4500;
        }

        .force-value {
            position: absolute;
            top: -25px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(255, 255, 255, 0.9);
            padding: 2px 6px;
            border-radius: 10px;
            font-size: 12px;
            font-weight: bold;
            color: #333;
            border: 1px solid #ccc;
        }

        .character-info {
            position: absolute;
            bottom: -20px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 10px;
            font-weight: bold;
            color: #333;
            text-align: center;
            background: rgba(255, 255, 255, 0.8);
            padding: 2px 4px;
            border-radius: 5px;
        }

        .team-list {
            max-height: 150px;
            overflow-y: auto;
            margin-top: 10px;
            padding: 5px;
            background: rgba(255, 255, 255, 0.5);
            border-radius: 5px;
        }

        .team-member {
            display: flex;
            justify-content: between;
            align-items: center;
            padding: 5px;
            margin: 2px 0;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 5px;
            font-size: 12px;
        }

        .member-info {
            flex-grow: 1;
        }

        .sweat-drop {
            position: absolute;
            width: 6px;
            height: 8px;
            background: #87CEEB;
            border-radius: 50% 50% 50% 0;
            top: 5px;
            right: 5px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .pulling .sweat-drop {
            opacity: 1;
            animation: sweatDrop 1s infinite;
        }

        .pulling .head {
            background: #FFB6C1;
        }

        .pulling {
            animation: pullStrain 0.5s infinite alternate;
        }

        @keyframes pullStrain {
            0% { transform: rotate(0deg) scale(1); }
            100% { transform: rotate(-2deg) scale(1.05); }
        }

        @keyframes sweatDrop {
            0% { transform: translateY(0px); opacity: 1; }
            100% { transform: translateY(10px); opacity: 0; }
        }

        .status-display {
            background: rgba(255, 255, 255, 0.9);
            border-radius: 10px;
            padding: 15px;
            margin-top: 20px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
            text-align: center;
        }

        .force-summary {
            display: flex;
            justify-content: space-around;
            margin-bottom: 10px;
        }

        .force-info {
            font-weight: bold;
            font-size: 18px;
        }

        .team-a-force { color: #4169E1; }
        .team-b-force { color: #DC143C; }
        .net-force { color: #2E8B57; }

        /* Navbar styles - match homepage.css */
.header {
    position: static !important;
    top: unset !important;
    left: unset !important;
    right: unset !important;
    z-index: auto !important;
    background: transparent;
    pointer-events: auto;
    width: 100%;
    margin-bottom: 0;
    box-shadow: none;
    padding: 0;
}

.navbar {
    position: static !important;
    margin-top: 0 !important;
    box-shadow: 0 4px 24px rgba(76, 175, 255, 0.10);
    background: linear-gradient(90deg, #b3e6fc 0%, #4fc3f7 100%);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    width: 100%;
    min-height: 72px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    left: unset;
    right: unset;
    max-width: 100vw;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.nav-left, .nav-right {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-left {
    flex: 1 1 0;
    justify-content: flex-start;
}

.nav-right {
    flex: 1 1 0;
    justify-content: flex-end;
}

.nav-link {
    text-decoration: none;
    color: #01579b;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 1px;
    transition: color 0.3s, background 0.3s, box-shadow 0.3s;
    padding: 8px 16px;
    border-radius: 20px;
}

.nav-link:hover {
    color: #0288d1;
    background: rgba(76, 195, 247, 0.10);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 80px;
    min-width: 120px;
    padding: 0 20px;
    z-index: 1;
}

.logo-image {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
}

.nav-btn {
    background: #4fc3f7;
    color: #fff !important;
    border: none;
    box-shadow: 0 2px 8px rgba(76,175,255,0.08);
    font-weight: bold;
    padding: 8px 22px;
    margin: 0 2px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.nav-btn:hover,
.nav-btn:focus {
    background: #0288d1;
    color: #fff;
    box-shadow: 0 4px 16px rgba(76,175,255,0.15);
}

/* Responsive Design for Navbar */
@media (max-width: 1400px) {
    .navbar {
        max-width: 100vw;
        width: 100vw;
        margin: 0;
        padding: 0 12px;
        border-radius: 28px;
    }
    .logo-image {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 1100px) {
    .navbar {
        max-width: 100vw;
        width: 100vw;
        margin: 0;
        padding: 0 8px;
        border-radius: 24px;
    }
    .logo-image {
        width: 70px;
        height: 70px;
    }
    .nav-link {
        font-size: 15px;
        padding: 7px 12px;
    }
}

@media (max-width: 900px) {
    .navbar {
        max-width: 100vw;
        width: 100vw;
        margin: 0;
        padding: 0 4px;
        border-radius: 18px;
    }
    .logo-image {
        width: 60px;
        height: 60px;
    }
    .nav-link {
        font-size: 14px;
        padding: 6px 8px;
    }
}

@media (max-width: 700px) {
    .navbar {
        max-width: 100vw;
        width: 100vw;
        margin: 0;
        border-radius: 12px;
        padding: 0 2vw;
        min-height: 44px;
    }
    .nav-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0;
    }
    .nav-left, .nav-right {
        flex-direction: row;
        gap: 4px;
        justify-content: flex-start;
        align-items: center;
    }
    .logo {
        height: 48px;
        min-width: 60px;
        padding: 0 2px;
        justify-content: center;
        left: 50%;
        transform: translateX(-50%);
        position: absolute;
        z-index: 1;
    }
    .logo-image {
        width: 44px;
        height: 44px;
    }
    .nav-link {
        font-size: 13px;
        padding: 5px 6px;
    }
}

@media (max-width: 400px) {
    .logo-image {
        width: 32px;
        height: 32px;
    }
    .nav-link {
        font-size: 11px;
        padding: 3px 4px;
    }
}

/* Simulation area background */
.simulation-area {
    background: linear-gradient(120deg, #e0f7fa 0%, #b2ebf2 100%);
    border-radius: 18px;
    box-shadow: 0 2px 16px #b3e5fc;
    padding: 32px 16px;
    margin: 60px auto 32px auto;
    width: 95%;
    max-width: 900px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Grass background for stimulation area */
.stimulation-grass-bg {
    position: relative;
    width: 100%;
    min-height: 220px;
    background: linear-gradient(0deg, #43a047 60%, #b3e6fc 100%);
    border-radius: 18px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 32px 24px 80px 24px;
    box-sizing: border-box;
}

/* Layout for force display at the top */
.simulation-forces-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-bottom: 12px;
    margin-top: 24px;
    font-size: 1.18em;
    font-weight: bold;
    color: #1976d2;
    text-align: center;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px #e3f6ff;
    padding: 12px 0 6px 0;
    border: 1.5px solid #e3f6ff;
}
.simulation-force-value {
    display: inline-block;
    min-width: 110px;
    margin: 0 4px;
    font-size: 1.1em;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0 8px;
}
.simulation-force-value#team-a-force {
    color: #1976d2;
}
.simulation-force-value#team-b-force {
    color: #e74c3c;
}
.simulation-force-value#net-force {
    color: #43a047;
}

/* Main Layout: Inputs Left/Right, Field Center */
.stimulation-layout-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    gap: 0;
    position: relative;
    margin-bottom: 0;
}

/* Move control panel 1 (Team A) to the left, control panel 2 (Team B) to the right */
.stimulation-player-input {
    flex: 0 0 270px;
    min-width: 220px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 2;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 12px #b3e5fc;
    padding: 18px 16px 18px 16px;
    margin-top: 32px;
    margin-bottom: 0;
    border: 2px solid #e3f6ff;
    order: 0;
}
#team-a-input {
    border: 2px solid #1976d2;
    margin-right: 18px;
    order: 0; /* left */
}
.stimulation-grass-bg {
    flex: 1 1 0;
    min-width: 600px;
    max-width: 1100px;
    min-height: 320px;
    height: 340px;
    background: linear-gradient(180deg, #b3e6fc 0%, #aee571 70%, #43a047 100%);
    border-radius: 18px;
    margin: 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    padding: 0;
    border: 2px solid #90caf9;
    box-shadow: 0 2px 16px #b3e5fc;
    order: 1;
}
#team-b-input {
    border: 2px solid #e74c3c;
    margin-left: 18px;
    order: 2; /* right */
}

/* Responsive Layout */
@media (max-width: 1100px) {
    .stimulation-layout-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .stimulation-player-input {
        max-width: 100%;
        min-width: 0;
        margin: 18px auto 0 auto;
        order: unset;
    }
    #team-a-input, #team-b-input {
        margin: 0 auto 0 auto;
    }
    .stimulation-grass-bg {
        margin: 18px 0;
        min-width: 0;
        min-height: 180px;
        order: unset;
    }
    .stimulation-buttons {
        margin-top: 18px;
    }
}
@media (max-width: 700px) {
    .simulation-forces-bar {
        flex-direction: column;
        gap: 8px;
        font-size: 1em;
        padding: 8px 0 4px 0;
    }
    .stimulation-layout-row {
        flex-direction: column;
        gap: 0;
    }
    .stimulation-player-input {
        margin: 10px auto 0 auto;
        padding: 10px 4px 10px 4px;
        order: unset;
    }
    .stimulation-grass-bg {
        padding: 0;
        min-height: 120px;
        order: unset;
    }
    .stimulation-buttons {
        gap: 10px;
        margin-top: 10px;
    }
}
@media (max-width: 1200px) {
    .stimulation-grass-bg {
        min-width: 400px;
        max-width: 98vw;
        height: 220px;
    }
    #rope, .rope {
        width: 220px;
        height: 14px;
    }
}
@media (max-width: 700px) {
    .stimulation-grass-bg {
        min-width: 0;
        width: 100%;
        height: 120px;
        max-width: 100vw;
    }
    #rope, .rope {
        width: 120px;
        height: 10px;
    }
}

/* 4. Control Buttons Below Field */
.stimulation-buttons {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 0;
    position: relative;
    z-index: 3;
}
.stimulation-buttons button {
    border-radius: 24px;
    font-size: 1.1em;
    font-weight: bold;
    padding: 10px 32px;
    box-shadow: 0 2px 8px #b3e5fc;
    border: none;
    margin: 0 4px;
    transition: background 0.2s;
}
.stimulation-buttons button:first-child {
    background: #ff9800;
    color: #fff;
}
.stimulation-buttons button:last-child {
    background: #8e24aa;
    color: #fff;
}
.stimulation-buttons button:hover {
    filter: brightness(0.95);
}
