:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --bg: #0F172A;
    --surface: #1E293B;
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --border: #334155;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

* {
    box-sizing: border-box;
}

header {
    width: 100%;
    padding: 2.5rem 1rem;
    text-align: center;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.95), transparent);
}

h1 {
    margin: 0;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #A78BFA, #38BDF8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

p.subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: 1.15rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
    position: relative;
    z-index: 10;
}

.upload-btn {
    position: relative;
    background: linear-gradient(135deg, #4F46E5, #6366F1);
    color: white;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

.upload-btn:active {
    transform: translateY(1px);
}

input[type="file"] {
    display: none;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-top: 1rem;
}

.image-card {
    background-color: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    aspect-ratio: 4 / 3;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.image-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    border-color: #818CF8;
    z-index: 1;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-card:hover img {
    transform: scale(1.08);
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.25rem 1.25rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.8) 50%, rgba(15, 23, 42, 0) 100%);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-card:hover .image-info {
    opacity: 1;
    transform: translateY(0);
}

.image-name {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-size {
    color: #818CF8;
    font-size: 0.8rem;
    font-weight: 600;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    text-align: center;
    border: 2px dashed rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    width: 100%;
    background-color: rgba(30, 41, 59, 0.4);
    margin-top: 2rem;
    transition: all 0.3s ease;
}

.empty-state:hover {
    border-color: rgba(148, 163, 184, 0.4);
    background-color: rgba(30, 41, 59, 0.6);
}

.empty-state svg {
    width: 72px;
    height: 72px;
    color: #475569;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.empty-state:hover svg {
    color: #64748B;
}

.empty-state h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 350px;
    line-height: 1.5;
}
