* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
        
body {
    background: linear-gradient(135deg, #1a2a6c, #2c3e50);
    color: #ecf0f1;
    min-height: 100vh;
    padding: 20px;
}
        
.container {
    max-width: 1400px;
    margin: 0 auto;
}
        
header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
}
        
h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: #3498db;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}
        
.subtitle {
    font-size: 1.2rem;
    color: #bdc3c7;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}
        
.main-content {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
}
        
.panel {
    background: rgba(30, 40, 70, 0.7);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(52, 152, 219, 0.3);
}
        
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
}
        
h2 {
    font-size: 1.8rem;
    color: #3498db;
}
        
.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
        
.btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
        
.btn-danger {
    background: #e74c3c;
}
        
.btn-success {
    background: #2ecc71;
}
        
.btn-warning {
    background: #f39c12;
}
        
.btn-danger:hover {
    background: #c0392b;
}
        
.config-section {
    flex: 1;
}
        
.preview-section {
    flex: 0 0 500px;
}
        
.content-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}
        
.content-item {
    background: rgba(25, 35, 65, 0.7);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 15px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
}
        
.content-item:hover {
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
        
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
        
.content-type {
    font-size: 0.9rem;
    background: rgba(52, 152, 219, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
}
        
.form-group {
    margin-bottom: 15px;
}
        
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #bdc3c7;
}
        
input, select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    background: rgba(20, 30, 50, 0.5);
    color: white;
    font-size: 1rem;
}
        
input:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}
        
.inline-fields {
    display: flex;
    gap: 15px;
}
        
.inline-fields > div {
    flex: 1;
}
        
.oled-preview {
    background: #1a1a2e;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
        
.oled-screen {
    width: 400px;
    height: 200px;
    background: #0d0d1a;
    border-radius: 8px;
    border: 2px solid #3498db;
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7), 0 0 30px rgba(52, 152, 219, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}
        
#previewCanvas {
    background: #000;
    image-rendering: pixelated;
}
        
.screen-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
}
        
.page-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}
        
.export-section {
    margin-top: 30px;
    text-align: center;
}
        
.code-block {
    background: rgba(20, 30, 50, 0.7);
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    border: 1px solid rgba(52, 152, 219, 0.3);
}
        
.export-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}
        
.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}
        
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(200%);
    transition: transform 0.4s ease;
    z-index: 1000;
}
        
.notification.show {
    transform: translateX(0);
}
        
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}
        
.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    color: #3498db;
}
        
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}
        
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
        
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2c3e50;
    transition: .4s;
    border-radius: 30px;
}
        
.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
        
input:checked + .slider {
    background-color: #3498db;
}
        
input:checked + .slider:before {
    transform: translateX(30px);
}
        
.pixel-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.2;
    background: 
        linear-gradient(to right, #555 1px, transparent 1px),
        linear-gradient(to bottom, #555 1px, transparent 1px);
    background-size: 5px 5px;
}
        
.grid-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
        
.page-info {
    background: rgba(52, 152, 219, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
}
        
.y-explanation {
    background: rgba(46, 204, 113, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.9rem;
}
        
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(52, 152, 219, 0.3);
    color: #7f8c8d;
    font-size: 0.9rem;
}
        
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }
        
    .preview-section {
        flex: 1;
    }
        
    .oled-screen {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 2/1;
    }
        
    #previewCanvas {
        width: 100%;
        height: auto;
    }
}