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

:root {
    --bg-main: #09090b;
    --bg-card: rgba(18, 18, 22, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #06b6d4; /* cyan */
    --primary-glow: rgba(6, 182, 212, 0.35);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --success: #10b981;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.08) 0px, transparent 50%);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #fff 30%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
    text-shadow: 0 0 30px rgba(6, 182, 212, 0.2);
}

p.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 8px;
}

.container {
    width: 90%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-bottom: 50px;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.upload-zone {
    border: 2px dashed rgba(6, 182, 212, 0.25);
    background: rgba(6, 182, 212, 0.02);
    border-radius: 16px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.05);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
    transition: transform 0.3s ease;
}

.upload-zone:hover .upload-icon {
    transform: translateY(-5px);
}

.upload-text {
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.upload-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
}

#fileInput {
    display: none;
}

/* Result Box */
.result-box {
    display: none;
    margin-top: 25px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    animation: fadeIn 0.4s ease;
}

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

.result-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.url-input-container {
    display: flex;
    gap: 10px;
}

.url-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.url-input:focus {
    border-color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
    background: #22d3ee;
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.preview-container {
    margin-top: 20px;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    max-height: 250px;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
}

.preview-container img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Gallery Section */
.gallery-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.image-card {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    cursor: pointer;
    background: rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.image-card:hover {
    transform: scale(1.04);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

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

/* Custom Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #18181b;
    border: 1px solid var(--success);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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