:root {
    --bg: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --text: #ffffff;
    --text-secondary: #a0a0b0;
    --primary: #ff6b2b;
    --primary-glow: rgba(255, 107, 43, 0.3);
    --secondary: #ccff00;
    --accent: #ff3cac;
    --border: #2a2a3a;
    --gradient-1: linear-gradient(135deg, #ff6b2b 0%, #ff3cac 100%);
    --gradient-2: linear-gradient(135deg, #ccff00 0%, #00ff88 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.hero {
    padding: 8rem 2rem 4rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero .gradient {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px dashed var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.section > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    background: var(--bg-secondary);
    transition: all 0.3s;
    cursor: pointer;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(255, 107, 43, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-zone p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.video-preview {
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
}

.video-preview video {
    width: 100%;
    display: block;
}

.size-selector {
    margin-top: 2rem;
}

.size-selector h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.size-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.size-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.size-card:hover, .size-card.active {
    border-color: var(--primary);
    background: rgba(255, 107, 43, 0.05);
}

.size-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.size-dims {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.thumbnails-grid {
    margin-top: 2rem;
}

.thumbnails-grid h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.thumb-item {
    aspect-ratio: 9/16;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s;
}

.thumb-item:hover {
    transform: scale(1.05);
}

.thumb-item img, .thumb-item canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.thumb-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.analyze-input {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.analyze-input input {
    flex: 1;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 1rem;
}

.analyze-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.analysis-result {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 9/16;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-views {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(0,0,0,0.7);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.modal-content canvas {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #000;
}

.edit-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.edit-controls input {
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

.edit-controls button {
    width: 100%;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .size-options {
        grid-template-columns: 1fr;
    }
}
