body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: #f0f2f5;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 90%;
    max-width: 1300px;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.controls div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.controls label {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 5px;
}

.controls input[type="number"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 120px;
    font-size: 1em;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.controls input[type="number"]::-webkit-outer-spin-button,
.controls input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

button {
    padding: 10px 20px;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    align-self: flex-end;
}

#startButton {
    background-color: #28a745;
}

#startButton:hover {
    background-color: #218838;
}

#resetButton {
    background-color: #dc3545;
}

#resetButton:hover {
    background-color: #c82333;
}

#revertButton {
    background-color: #6c757d;
}
#revertButton:hover {
    background-color: #5a6268;
}

.display-area {
    display: flex;
    justify-content: space-around;
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 1.3em;
    color: #333;
}

.display-area span {
    font-weight: bold;
    color: #007bff;
}

.simulation-area {
    position: relative;
    width: 1200px;
    height: 800px;
    border: 2px solid #ccc;
    background-color: #f8f9fa;
    overflow: hidden;
    margin: 0 auto 30px auto;
    border-radius: 8px;
    cursor: grab;
}

.ground-line {
    position: absolute;
    bottom: 400px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #6c757d;
    z-index: 1;
}

#object {
    position: absolute;
    width: 60px;
    height: 30px;
    background-color: #007bff;
    border-radius: 5px 5px 0 0;
    bottom: 390px;
    left: 0px;
    z-index: 3;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

/* ★ここから修正★ */
#object.custom-object {
    /* 背景色とボーダーをリセット */
    background-color: transparent;
    border-radius: 0;
}

#object:not(.custom-object)::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 15px;
    width: 30px;
    height: 20px;
    background-color: #5bb7ff;
    border-radius: 3px 3px 0 0;
    z-index: 4;
}

#object:not(.custom-object)::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 10px;
    width: 20px;
    height: 20px;
    background-color: #333;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 40px 0 0 #333;
}
/* ★ここまで修正★ */

.scale-marks {
    position: absolute;
    bottom: 400px;
    left: 0;
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: flex-start;
    font-size: 0.8em;
    color: #666;
    z-index: 2;
}

.scale-mark {
    position: absolute;
    bottom: 0;
    width: 1px;
    background-color: #a0a0a0;
    transform: translateX(-50%);
    z-index: 2;
    height: 6px;
}

.scale-label {
    position: absolute;
    bottom: -30px;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 1em;
    font-weight: bold;
    color: #555;
    z-index: 2;
}

.path-plots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.plot-dot {
    position: absolute;
    width: 60px;
    height: 30px;
    background-color: rgba(0, 123, 255, 0.3);
    border-radius: 5px 5px 0 0;
    transform: translateX(-50%);
    bottom: 390px;
    z-index: 3;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

/* ★ここから修正★ */
.plot-dot.custom-object {
    background-color: transparent;
    border-radius: 0;
}

.plot-dot:not(.custom-object)::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 15px;
    width: 30px;
    height: 20px;
    background-color: rgba(91, 183, 255, 0.3);
    border-radius: 3px 3px 0 0;
    z-index: 4;
}

.plot-dot:not(.custom-object)::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 10px;
    width: 20px;
    height: 20px;
    background-color: rgba(51, 51, 51, 0.3);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 40px 0 0 rgba(51, 51, 51, 0.3);
}
/* ★ここまで修正★ */

.plot-time-label {
    position: absolute;
    bottom: 470px;
    transform: translateX(-50%);
    font-size: 0.7em;
    color: #2a6f2a;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2px 4px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 4;
}

.plot-velocity-label {
    position: absolute;
    bottom: 445px;
    transform: translateX(-50%);
    font-size: 0.8em;
    color: #444;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2px 4px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 4;
}

.plot-distance-label {
    position: absolute;
    bottom: 420px;
    transform: translateX(-50%);
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2px 4px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 4;
}

.footer {
    margin-top: 30px;
    font-size: 0.85em;
    color: #777;
    line-height: 1.5;
}
/* ★ここから追加★ */
/* 軌跡の画像に適用する半透明クラス */
.custom-plot-image {
    opacity: 0.5; /* 半透明にする */
}
/* ★ここまで追加★ */

/* ★ここから追加★ */
#data-table-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px 8px 0 0;
    overflow-y: auto;
    max-height: 150px;
    padding: 10px;
}

#data-table {
    border-collapse: collapse;
    width: auto;
}

#data-table th, #data-table td {
    padding: 5px 15px;
    border-bottom: 1px solid #ddd;
    text-align: right;
    font-family: monospace;
    font-size: 0.9em;
    color: #333;
}

#data-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #555;
    position: sticky;
    top: 0;
}
/* ★ここまで追加★ */