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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #fff;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

.controls-panel {
    width: 320px;
    background: linear-gradient(180deg, #2a2a2a 0%, #1f1f1f 100%);
    padding: 20px;
    overflow-y: auto;
    border-right: 3px solid #333;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

.controls-panel h1 {
    color: #00ff88;
    margin-bottom: 25px;
    text-align: center;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 2px;
}

.media-upload {
    margin-bottom: 25px;
}

.media-upload input[type="file"] {
    display: none;
}

.upload-btn {
    display: block;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #1a1a1a;
    padding: 15px 25px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-btn:hover {
    background: linear-gradient(135deg, #00cc6a 0%, #00aa55 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.drop-zone {
    margin-top: 15px;
    border: 2px dashed #555;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.drop-zone.drag-over {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    transform: scale(1.02);
}

.drop-content p {
    margin: 5px 0;
    font-size: 12px;
    color: #888;
}

.drop-content p:first-child {
    color: #bbb;
    font-weight: 500;
}

.media-library {
    margin-bottom: 25px;
}

.media-library h2 {
    margin-bottom: 15px;
    color: #ccc;
    font-size: 16px;
    font-weight: 500;
}

.media-items {
    max-height: 200px;
    overflow-y: auto;
}

.media-item {
    background: #3a3a3a;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.media-item:hover {
    border-color: #555;
    background: #404040;
}

.media-item.selected {
    border-color: #00ff88;
    background: #2d4a3a;
}

.media-item .thumbnail {
    width: 50px;
    height: 35px;
    background: #222;
    border-radius: 4px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #888;
}

.media-item .info {
    flex: 1;
}

.media-item .name {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}

.media-item .type {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
}

.selected-controls {
    background: linear-gradient(135deg, #3a3a3a 0%, #2d2d2d 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #444;
}

.selected-controls h2 {
    margin-bottom: 20px;
    color: #00ff88;
    font-size: 16px;
    font-weight: 500;
}

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

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

.control-group input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.control-group span {
    font-size: 12px;
    color: #00ff88;
    float: right;
    font-weight: 600;
}

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

.delete-btn,
.duplicate-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.delete-btn {
    background: linear-gradient(135deg, #ff4444 0%, #cc2222 100%);
    color: white;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #ff2222 0%, #aa1111 100%);
    transform: translateY(-1px);
}

.duplicate-btn {
    background: linear-gradient(135deg, #4488ff 0%, #2266cc 100%);
    color: white;
}

.duplicate-btn:hover {
    background: linear-gradient(135deg, #2266ff 0%, #1155aa 100%);
    transform: translateY(-1px);
}

.app-controls {
    margin-bottom: 25px;
}

.fullscreen-btn,
.clear-btn,
.grid-btn {
    width: 100%;
    margin-bottom: 10px;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fullscreen-btn {
    background: linear-gradient(135deg, #0088ff 0%, #0066cc 100%);
    color: white;
}

.fullscreen-btn:hover {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    transform: translateY(-1px);
}

.clear-btn {
    background: linear-gradient(135deg, #ff8800 0%, #cc6600 100%);
    color: white;
}

.clear-btn:hover {
    background: linear-gradient(135deg, #ee7700 0%, #bb5500 100%);
    transform: translateY(-1px);
}

.grid-btn {
    background: linear-gradient(135deg, #8800ff 0%, #6600cc 100%);
    color: white;
}

.grid-btn:hover {
    background: linear-gradient(135deg, #7700ee 0%, #5500bb 100%);
    transform: translateY(-1px);
}

.info-panel {
    background: #252525;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #333;
}

.info-panel p {
    margin-bottom: 10px;
    font-size: 13px;
    color: #00ff88;
    font-weight: 600;
}

.info-panel ul {
    list-style: none;
}

.info-panel li {
    font-size: 11px;
    color: #bbb;
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
}

.info-panel li:before {
    content: "•";
    color: #00ff88;
    position: absolute;
    left: 0;
}

.canvas-container {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
}

.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #000;
}

.fullscreen-mode .controls-panel {
    display: none;
}

.fullscreen-mode .canvas-container {
    width: 100vw;
    height: 100vh;
}

/* True fullscreen styles */
body:fullscreen {
    background: #000;
}

body:-webkit-full-screen {
    background: #000;
}

body:-moz-full-screen {
    background: #000;
}

body:-ms-fullscreen {
    background: #000;
}

/* Hide scrollbars in fullscreen */
body:fullscreen,
body:-webkit-full-screen,
body:-moz-full-screen,
body:-ms-fullscreen {
    overflow: hidden;
}

/* Ensure canvas takes full screen in true fullscreen */
.fullscreen-mode {
    background: #000 !important;
}

.fullscreen-mode .canvas-container canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 10000 !important;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: linear-gradient(90deg, #333 0%, #555 100%);
    outline: none;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}
