/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #4a90e2, #7b68ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: #888;
    font-size: 1.1rem;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.canvas-container {
    position: relative;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#mandelbrot {
    display: block;
    width: 100%;
    height: 500px;
    cursor: grab;
}

#mandelbrot:active {
    cursor: grabbing;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(74, 144, 226, 0.9);
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 500;
    display: none;
}

.loading.active {
    display: block;
}

.controls {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.control-group {
    flex: 1;
    min-width: 200px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: #bbb;
    font-size: 0.9rem;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #4a90e2;
    border-radius: 50%;
    cursor: pointer;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #4a90e2;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.control-group select {
    width: 100%;
    padding: 8px 12px;
    background: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-reset {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.info {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
}

.info p {
    color: #4a90e2;
    margin-bottom: 10px;
    font-weight: 500;
}

.info ul {
    list-style: none;
    color: #bbb;
}

.info li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.info li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #4a90e2;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: #666;
    font-size: 0.9rem;
}

/* レスポンシブ */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .control-group {
        width: 100%;
    }
    
    #mandelbrot {
        height: 300px;
    }
}