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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f0f;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

header h1 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: #888;
    font-size: 0.95rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-error {
    background: #2d1515;
    border: 1px solid #5c2020;
    color: #f87171;
}

.alert-success {
    background: #152d1a;
    border: 1px solid #1e5c2e;
    color: #4ade80;
}

.url-box {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.url-box input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    font-family: monospace;
}

/* Dropzone */
.dropzone {
    border: 2px dashed #333;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: #6366f1;
    background: #1a1a2e;
}

.dropzone-content svg {
    color: #555;
    margin-bottom: 1rem;
}

.dropzone-content p {
    color: #aaa;
    margin-bottom: 0.25rem;
}

.dropzone-content .link {
    color: #6366f1;
    text-decoration: underline;
}

.dropzone-content .hint {
    color: #666;
    font-size: 0.8rem;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}

.btn-upload {
    background: #6366f1;
    color: #fff;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

.btn-upload:hover {
    background: #4f46e5;
}

.btn-copy {
    background: #2563eb;
    color: #fff;
}

.btn-copy:hover {
    background: #1d4ed8;
}

.btn-delete {
    background: #dc2626;
    color: #fff;
}

.btn-delete:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Gallery */
h2 {
    margin: 2.5rem 0 1rem;
    font-size: 1.3rem;
    color: #fff;
}

h2 .count {
    color: #666;
    font-weight: 400;
}

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

.card {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #222;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: #444;
}

.card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #111;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    padding: 0.75rem;
}

.card-name {
    font-size: 0.85rem;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.card-meta {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.inline {
    display: inline;
}

.hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Empty state */
.empty {
    text-align: center;
    padding: 3rem;
    color: #555;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #6366f1;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .dropzone {
        padding: 2rem 1rem;
    }

    .gallery {
        grid-template-columns: 1fr;
    }
}
