/* --- Root Variables & Base Setup --- */
:root {
    --accent: #0ea5e9;       /* Deep Sky Blue */
    --success: #10b981;      /* Emerald Green for Download */
    --dark-bg: #020617;      /* Rich Slate Black */
    --glass: rgba(15, 23, 42, 0.8);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--dark-bg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* --- Container & Layout --- */
.container {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

header h1 span {
    color: var(--accent);
}

/* --- Profile Photo Hub --- */
.photo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 120px;
    cursor: pointer;
}

.avatar-preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-icon {
    font-size: 3rem;
    color: rgba(255,255,255,0.2);
}

.upload-overlay {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--accent);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 3px solid var(--dark-bg);
}

/* --- Form Elements --- */
form input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    color: white;
    font-size: 1rem;
    transition: border 0.3s;
}

form input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255,255,255,0.08);
}

#generateBtn {
    width: 100%;
    padding: 1.1rem;
    background: var(--accent);
    border: none;
    border-radius: 1rem;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 1rem;
}

#generateBtn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* --- The Bottom Result Section (Dashboard) --- */
.result-card {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1.5rem;
    border: 1px solid rgba(14, 165, 233, 0.2);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-badge {
    color: var(--success);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.url-action-bar {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.8rem;
    padding: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.url-action-bar input {
    border: none !important;
    background: transparent !important;
    margin-bottom: 0 !important;
    font-size: 0.8rem;
    color: var(--text-dim);
    flex-grow: 1;
}

.icon-btn {
    background: var(--accent);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* --- Action Buttons --- */
.main-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    border-radius: 1.2rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-variant {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4);
}

.qr-variant {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(30, 41, 59, 0.4);
}

.action-btn:hover {
    transform: translateY(-5px);
    filter: brightness(1.15);
}

.btn-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.btn-text {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hidden { display: none; }

/* Mobile Optimization */
@media (max-width: 450px) {
    .main-actions { grid-template-columns: 1fr; }
    .container { padding: 1.5rem; }
}