/* Tailwind CSS CDN */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* Custom Variables - Scientific Color Palette */
:root {
    --primary-light: #4FC3F7;
    --primary: #29B6F6;
    --primary-dark: #0288D1;
    --bg-dark: #0a0a0f;
    --bg-medium: #1a1a2e;
    --bg-light: #16213e;
    --text-primary: #FFFFFF;
    --text-secondary: #B0BEC5;
    --text-muted: #546E7A;
    --success: #00E676;
    --warning: #FFD740;
    --danger: #FF5252;
    --glass-bg: rgba(26, 26, 46, 0.75);
    --glass-border: rgba(79, 195, 247, 0.2);
    --shadow-glow: 0 0 30px rgba(79, 195, 247, 0.3);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    position: relative;
}

/* Canvas Container */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Glass Panel Effect */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-glow), 
                0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Title Panel */
.title-panel {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
    pointer-events: none;
}

.main-title {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(79, 195, 247, 0.5);
    letter-spacing: 2px;
    animation: titleGlow 3s ease-in-out infinite;
}

.subtitle {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-secondary);
    margin-top: 8px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

@keyframes titleGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

/* Info Panel - Left Side */
.info-panel {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    padding: 24px;
    z-index: 100;
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.panel-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--glass-border);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.info-label {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
}

.info-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.info-value.highlight {
    color: var(--success);
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.5);
}

.info-description {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.info-description strong {
    color: var(--primary-light);
}

/* Control Panel - Bottom */
.control-panel {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    max-width: calc(100vw - 60px);
    padding: 24px 32px;
    z-index: 100;
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.control-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn .icon {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    border-color: var(--primary);
}

/* Slider */
.slider-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-label {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.6);
    transition: transform 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.6);
}

.slider-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-light);
    text-align: right;
}

/* Control Info */
.control-info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.hint {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 300;
}

/* Responsive Design */
@media (max-width: 900px) {
    .control-panel {
        width: calc(100vw - 40px);
        padding: 20px 24px;
    }
    
    .control-group {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .btn {
        flex: 1;
        justify-content: center;
    }
    
    .slider-container {
        width: 100%;
        order: 3;
    }
}

@media (max-width: 768px) {
    .info-panel {
        left: 20px;
        right: 20px;
        width: auto;
        top: auto;
        bottom: 200px;
        transform: none;
        animation: slideInUp 0.8s ease-out;
    }
    
    .main-title {
        font-size: 32px;
    }
    
    .subtitle {
        font-size: 14px;
    }
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smooth transitions for all elements */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
