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

body {
    font-family: 'Rajdhani', sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1a2e 100%);
    color: #fff;
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom: 2px solid #00ffff;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.berry-badge {
    font-size: 0.9rem;
    opacity: 0.8;
}

.berry-badge a {
    color: #00ffff;
    text-decoration: none;
    transition: all 0.3s;
}

.berry-badge a:hover {
    color: #ff00ff;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.8);
}

.main-container {
    display: flex;
    height: calc(100vh - 100px);
    gap: 1rem;
    padding: 1rem;
}

.control-panel, .info-panel {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-y: auto;
}

.left-panel {
    width: 280px;
}

.info-panel {
    width: 250px;
}

.panel-section {
    margin-bottom: 2rem;
}

.panel-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #a0aec0;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.power-indicator {
    height: 8px;
    background: linear-gradient(90deg, #ff0000, #00ff00);
    border-radius: 4px;
    margin-top: 0.5rem;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transition: width 0.3s;
}

.color-presets {
    display: flex;
    gap: 0.5rem;
}

.color-btn {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: #000;
    transition: all 0.3s;
}

.color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px currentColor;
}

.color-btn.active {
    border-color: #00ffff;
    box-shadow: 0 0 20px #00ffff;
}

.tool-btn, .preset-btn {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.2));
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 8px;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tool-btn:hover, .preset-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.4), rgba(255, 0, 255, 0.4));
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

.tool-btn.danger {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(255, 100, 100, 0.2));
    border-color: rgba(255, 0, 0, 0.5);
}

.tool-btn.danger:hover {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.4), rgba(255, 100, 100, 0.4));
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    accent-color: #00ffff;
}

.canvas-container {
    flex: 1;
    position: relative;
    background: rgba(10, 14, 26, 0.8);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

#laserCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.canvas-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #00ffff;
    pointer-events: none;
}

.stats-section, .fun-facts, .tips-section {
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.stat-item span {
    color: #a0aec0;
    font-size: 0.9rem;
}

.stat-item strong {
    color: #00ffff;
    font-size: 1rem;
}

.fun-facts p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #cbd5e0;
    transition: opacity 0.3s;
}

.tip {
    font-size: 0.85rem;
    color: #ffd700;
    font-style: italic;
}

footer {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(0, 255, 255, 0.3);
    padding: 1rem 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #a0aec0;
}

.footer-content a {
    color: #00ffff;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-content a:hover {
    color: #ff00ff;
}

.version {
    opacity: 0.6;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.8);
}

/* Responsive */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
    }
    
    .left-panel, .info-panel {
        width: 100%;
        max-height: 200px;
    }
    
    .canvas-container {
        height: 400px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .header-content {
        padding: 0.75rem 1rem;
    }
    
    .canvas-hint {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}