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

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

header p {
    color: #cccccc;
    font-size: 1.1rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 20px;
}

.display-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.device-frame {
    position: relative;
    padding: 30px;
    background: linear-gradient(145deg, #1a1a1a, #000000);
    border-radius: 30px;
    box-shadow: 
        0 0 50px rgba(0, 255, 255, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.05);
}

.device-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: #333;
    border-radius: 3px;
}

#display {
    border-radius: 10px;
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.8),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    border: 2px solid #333;
}

.bezel-reflection {
    position: absolute;
    top: 35px;
    left: 35px;
    right: 35px;
    height: 40px;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.03) 50%, transparent 60%);
    border-radius: 10px 10px 0 0;
    pointer-events: none;
}

.power-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    font-family: monospace;
}

.power-bar {
    width: 200px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.power-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #ffff00, #ff6600, #ff0000);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.controls-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    height: fit-content;
}

.control-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    color: #cccccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tab.active {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: #cccccc;
    font-weight: 500;
}

.control-group input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
    background: transparent;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.control-group span {
    color: #00ffff;
    font-family: monospace;
    font-size: 0.9rem;
}

.control-group input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #00ffff;
}

.content-buttons, .feature-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.content-btn, .feature-buttons button {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    color: #cccccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.content-btn.active, .feature-buttons button.active {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.content-btn:hover, .feature-buttons button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.color-swatch {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.pixel-pet {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.2);
    position: relative;
}

.pet-body {
    font-size: 2rem;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

.pet-speech {
    background: rgba(0, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #00ffff;
    display: none;
    position: relative;
}

.pet-speech::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: rgba(0, 255, 255, 0.1);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.info-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.pixel-info {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 0.9rem;
}

.pixel-info span {
    color: #cccccc;
}

.pixel-info span:last-child {
    color: #00ffff;
}

footer {
    text-align: center;
    padding: 20px;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
}

footer a {
    color: #00ffff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .controls-panel {
        order: -1;
    }
    
    #display {
        width: 100%;
        height: auto;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .device-frame {
        padding: 20px;
    }
    
    .control-tabs {
        flex-direction: column;
    }
    
    .content-buttons, .feature-buttons {
        grid-template-columns: 1fr;
    }
    
    .pixel-info {
        flex-direction: column;
        gap: 5px;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #ff00ff, #00ffff);
}