/**
 * Burning Ship Fractal Visualization Styles
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.burning-ship-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Main Content */
main {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    margin-bottom: 40px;
}

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

/* Canvas Wrapper */
.canvas-wrapper {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

#burningShipCanvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    cursor: crosshair;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.coordinate-display {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.render-status {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.8);
    color: #00ff00;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    display: none;
    z-index: 10;
}

.render-status.active {
    display: block;
}

/* Controls Panel */
.controls-panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

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

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.control-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.control-group select:hover,
.control-group select:focus {
    border-color: #667eea;
    outline: none;
}

.button-group {
    display: flex;
    gap: 10px;
}

.control-button {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.control-button:active {
    transform: translateY(0);
}

/* Formula Display */
.formula-display {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.formula-display h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #333;
}

.formula-item {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.math-formula {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Interesting Locations */
.interesting-locations {
    margin-top: 20px;
    margin-bottom: 20px;
}

.interesting-locations h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #555;
}

.interesting-locations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.location-btn {
    padding: 10px 12px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.location-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

/* Instructions */
.instructions {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.instructions h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #555;
}

.instructions ul {
    list-style: none;
    padding: 0;
}

.instructions li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: #666;
}

.instructions li:before {
    content: "→ ";
    color: #667eea;
    font-weight: bold;
}

/* Explanation Section */
.explanation {
    background: white;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

.explanation h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.explanation h3 {
    color: #764ba2;
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 15px;
}

.explanation p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #555;
    font-size: 1rem;
}

.explanation ul {
    margin: 15px 0;
    padding-left: 25px;
}

.explanation li {
    margin-bottom: 10px;
    line-height: 1.7;
    color: #555;
}

.explanation strong {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .controls-panel {
        padding: 20px;
    }

    .explanation {
        padding: 25px;
    }

    .explanation h2 {
        font-size: 1.5rem;
    }

    .explanation h3 {
        font-size: 1.1rem;
    }

    .interesting-locations {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .burning-ship-container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .coordinate-display {
        font-size: 0.8rem;
    }
}
