* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

header p {
    font-size: 1em;
    opacity: 0.9;
}

.content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
    min-height: 600px;
}

.controls {
    padding: 30px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.section {
    margin-bottom: 25px;
}

.section h2 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #333;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}

input[type="text"],
input[type="number"] {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 600;
}

button:hover {
    background: #5568d3;
}

button:active {
    transform: scale(0.98);
}

.area-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
}

.location-input {
    display: grid;
    grid-template-columns: 1fr 80px auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.location-input .unit {
    font-size: 0.9em;
    color: #666;
}

.input-hint {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

.location-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s;
}

.location-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.location-item-info {
    flex: 1;
}

.location-item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.location-item-time {
    font-size: 0.85em;
    color: #666;
}

.location-item-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 10px;
}

.remove-btn {
    padding: 6px 12px;
    background: #dc3545;
    font-size: 0.85em;
}

.remove-btn:hover {
    background: #c82333;
}

.clear-btn {
    width: 100%;
    background: #6c757d;
}

.clear-btn:hover {
    background: #5a6268;
}

.empty-message {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.map-container {
    position: relative;
    background: #e0e0e0;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

.map-info {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    font-size: 0.85em;
    z-index: 1000;
}

.map-info p {
    margin-bottom: 8px;
    line-height: 1.5;
}

.map-info p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .content {
        grid-template-columns: 1fr;
    }

    .controls {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: none;
    }

    #map {
        min-height: 400px;
    }
}
