* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}
.container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}
h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ff9a00, #ff2e63);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(255, 154, 0, 0.3);
}
.subtitle {
    font-size: 1.2rem;
    color: #a9b7d6;
    margin-bottom: 10px;
}
.content {
    display: flex;
    gap: 40px;
    width: 100%;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}
.joystick-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 300px;
    max-width: 500px;
}
.joystick-area {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 20px;
}
.joystick-base {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(255, 154, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 154, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.joystick-base::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 154, 0, 0.1);
}
.joystick-base::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 154, 0, 0.05);
}
.joystick-handle {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff9a00, #ff2e63);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.03s;
    z-index: 10;
}
.joystick-handle::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: linear-gradient(135deg, #ffaa33, #ff3e73);
    border-radius: 50%;
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.3);
}
.direction-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.direction-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 30px solid rgba(255, 154, 0, 0.7);
    transform-origin: 50% 50%;
}
.direction-arrow.up {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}
.direction-arrow.down {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
}
.direction-arrow.left {
    left: 10px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
}
.direction-arrow.right {
    right: 10px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
}
.info-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 300px;
    max-width: 500px;
}
.panel {
    background: rgba(13, 27, 42, 0.7);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 154, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 154, 0, 0.2);
}
.panel h2 {
    color: #ff9a00;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-align: center;
}
.coordinates {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.coordinate-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.coordinate-label {
    color: #a9b7d6;
}
.coordinate-value {
    font-weight: bold;
    color: #ff9a00;
}
.directions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}
.direction-btn {
    background: rgba(255, 154, 0, 0.2);
    border: 1px solid rgba(255, 154, 0, 0.5);
    color: #ff9a00;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.direction-btn:hover {
    background: rgba(255, 154, 0, 0.3);
    transform: scale(1.05);
}
.direction-btn.active {
    background: rgba(255, 154, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 154, 0, 0.5);
}
.direction-btn.center {
    grid-column: 2;
    grid-row: 2;
}
.instructions {
    text-align: left;
}
.instructions ul {
    list-style-type: none;
    padding-left: 10px;
}
.instructions li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}
.instructions li:before {
    content: "▶";
    color: #ff9a00;
    position: absolute;
    left: 0;
}
.event-log {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
}
.event-item {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.event-time {
    color: #a9b7d6;
    margin-right: 10px;
}
.event-action {
    color: #ff9a00;
}
footer {
    margin-top: 30px;
    text-align: center;
    color: #a9b7d6;
    font-size: 0.9rem;
    width: 100%;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 768px) {
    .content {
        flex-direction: column;
        align-items: center;
    }
    .joystick-container, .info-panel {
        width: 100%;
    }
}
