@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0d0d0d;
    color: #e0e0e0;
    padding: 20px;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 500;
    letter-spacing: -0.02em;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
}

h1::before {
    content: '//';
    color: #667eea;
    margin-right: 0.5em;
}

h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 15px auto 0;
}

.upload-section {
    margin-bottom: 40px;
}

.upload-zone {
    width: 100%;
    min-height: 180px;
    border: 1px solid #2a2a2a;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #0a0a0a;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    margin-bottom: 20px;
}

/* Corner brackets */
.upload-zone::before,
.upload-zone::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #667eea;
    border-style: solid;
    transition: border-color 0.2s ease;
}

.upload-zone::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.upload-zone::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.upload-zone:hover {
    border-color: #667eea;
    background: #0f0f0f;
}

.upload-zone:hover::before,
.upload-zone:hover::after {
    border-color: #764ba2;
}

.upload-zone.drag-over-upload {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.05);
}

.upload-content {
    text-align: center;
    padding: 30px;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.6;
}

.upload-content h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.upload-content p {
    font-size: 0.85rem;
    margin-bottom: 20px;
    color: #666;
}

.file-input {
    display: none;
}

.browse-btn {
    background: transparent;
    color: #667eea;
    border: 1px solid #667eea;
    padding: 10px 24px;
    border-radius: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.browse-btn:hover {
    background: #667eea;
    color: #0d0d0d;
}

.upload-stats {
    text-align: center;
    padding: 12px;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 0;
    margin-bottom: 20px;
}

.upload-stats span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 400;
}

#sphereContainer {
    width: 100%;
    height: 600px;
    position: relative;
    margin: 40px 0;
    border-radius: 0;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    overflow: hidden;
}

#sphereCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

#controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 13, 13, 0.95);
    color: #666;
    padding: 10px 20px;
    border-radius: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-align: center;
    border: 1px solid #2a2a2a;
}

.drop-zone p {
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
    color: #666;
}

.drop-zone.drag-over {
    border-color: #667eea;
}

.dropped-images {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.dropped-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dropped-image img {
    width: 120px;
    height: 90px;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: rgba(255, 0, 0, 1);
}

.delete-uploaded-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.image-container:hover .delete-uploaded-btn {
    display: flex;
}

.delete-uploaded-btn:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* Controls Section */
.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 16px 20px;
    background: #0a0a0a;
    border-radius: 0;
    border: 1px solid #1a1a1a;
}

.view-controls {
    display: flex;
    gap: 0;
}

.view-btn {
    background: transparent;
    color: #666;
    border: 1px solid #2a2a2a;
    padding: 8px 16px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.view-btn:first-child {
    border-right: none;
}

.view-btn:hover {
    color: #e0e0e0;
    border-color: #667eea;
}

.view-btn.active {
    background: #667eea;
    color: #0d0d0d;
    border-color: #667eea;
}

.filter-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

#categoryFilter, #searchInput {
    background: #0d0d0d;
    color: #e0e0e0;
    border: 1px solid #2a2a2a;
    padding: 8px 14px;
    border-radius: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
}

#categoryFilter:focus, #searchInput:focus {
    outline: none;
    border-color: #667eea;
}

#searchInput::placeholder {
    color: #444;
}

/* Grid Container */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
    margin: 20px 0;
}

/* Smartphone Frame */
.smartphone-frame {
    position: relative;
    background: #0a0a0a;
    border-radius: 4px;
    padding: 8px;
    transition: border-color 0.15s ease;
    cursor: pointer;
    border: 1px solid #1a1a1a;
}

.smartphone-frame:hover {
    border-color: #667eea;
}

/* Frame corner accents */
.smartphone-frame::before,
.smartphone-frame::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: #333;
    border-style: solid;
    transition: border-color 0.15s ease;
    pointer-events: none;
}

.smartphone-frame::before {
    top: 0;
    left: 0;
    border-width: 1px 0 0 1px;
}

.smartphone-frame::after {
    bottom: 0;
    right: 0;
    border-width: 0 1px 1px 0;
}

.smartphone-frame:hover::before,
.smartphone-frame:hover::after {
    border-color: #667eea;
}

.smartphone-screen {
    position: relative;
    background: #000;
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 9/19.5;
}

.smartphone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.15s ease;
}

.smartphone-frame:hover .smartphone-screen img {
    opacity: 0.9;
}

/* Phone Frame Details - minimized for cleaner look */
.phone-notch {
    display: none;
}

.phone-home-indicator {
    display: none;
}

/* Screenshot Info */
.screenshot-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: #e0e0e0;
    padding: 30px 12px 12px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.smartphone-frame:hover .screenshot-info {
    opacity: 1;
}

.screenshot-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 0.75rem;
    margin-bottom: 4px;
    color: #667eea;
}

.screenshot-category {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Category Tags - hidden by default, cleaner look */
.category-tag {
    display: none;
}

/* Loading Animation */
.loading-skeleton {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 2px;
    aspect-ratio: 9/19.5;
    position: relative;
    overflow: hidden;
}

.loading-skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #444;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    opacity: 0.4;
}

.empty-state h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    margin-bottom: 10px;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.empty-state p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

/* Toggle Switch */
.toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle input {
    display: none;
}

.toggle-slider {
    width: 36px;
    height: 18px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 0;
    position: relative;
    transition: all 0.15s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #444;
    top: 2px;
    left: 2px;
    border-radius: 0;
    transition: all 0.15s ease;
}

.toggle input:checked + .toggle-slider {
    border-color: #667eea;
}

.toggle input:checked + .toggle-slider::before {
    background: #667eea;
    transform: translateX(18px);
}

.toggle-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .controls-section {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .filter-controls {
        flex-direction: column;
        width: 100%;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .upload-zone {
        min-height: 160px;
    }

    .upload-content h2 {
        font-size: 1rem;
    }
}