:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --border-color: #334155;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
}

.container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
}

.panel {
    flex: 1;
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel h2 {
    font-size: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    color: #e2e8f0;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.5);
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-main);
}

.upload-btn {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-main);
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.photo-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--glass-border);
}

.canvas-container {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.canvas-container img {
    display: block;
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
}

.canvas-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
}

.toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.color-picker {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

.btn {
    background: var(--border-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.875rem;
}

.btn:hover {
    background: #475569;
}

.btn-primary {
    background: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-hover);
}

.reference-card {
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    align-items: flex-start;
}

.reference-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.reference-card textarea {
    flex: 1;
    min-height: 150px;
}

@media (max-width: 600px) {
    .reference-card {
        flex-direction: column;
    }
    .reference-card img {
        width: 100%;
        height: auto;
    }
}
