/* EZ Link - Premium Glassmorphism v4.2 */

/* ===== Variables ===== */
:root {
    /* Palette */
    --color-bg: #f9fafb;
    --color-surface: #ffffff;
    --color-text-main: #111827;
    --color-text-muted: #6b7280;
    
    --color-primary: #000000;
    --color-primary-hover: #333333;
    
    --color-border: #e5e7eb;
    --color-input-bg: #f3f4f6;
    
    --color-error: #ef4444;
    --color-success: #10b981;
    
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-pill: 9999px;
    
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Base Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ===== Typography ===== */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; color: var(--color-text-main); }
h1 { font-size: 2rem; }
h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p { font-size: 0.95rem; color: var(--color-text-muted); }
a { color: var(--color-text-main); text-decoration: none; font-weight: 600; }
a:hover { opacity: 0.7; }

/* ===== Layout ===== */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 2rem; }
.container.narrow { max-width: 440px; margin-top: 5vh; background: var(--color-surface); padding: 3rem 2.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }

/* ===== Dashboard Layout ===== */
.dashboard-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-border);
}
.header-content h1 { margin-bottom: 0.25rem; }
.user-meta { display: flex; gap: 1rem; color: var(--color-text-muted); font-size: 0.9rem; font-weight: 500; }
.header-actions { display: flex; gap: 0.75rem; }

.dashboard-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
.card {
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft);
}
.card.full-width { grid-column: 1 / -1; }
.card-header { padding: 1.5rem; border-bottom: 1px solid var(--color-border); background: #fafafa; }
.card-header h2 { margin: 0; font-size: 1.1rem; }
.card-header p { margin: 0; font-size: 0.85rem; }
.card-body { padding: 1.5rem; }
.dashboard-footer { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 1rem; }

/* ===== Forms ===== */
.form-group { margin-bottom: 1.5rem; }
input, select, textarea {
    width: 100%; padding: 0.75rem 1rem; font-size: 0.95rem;
    background-color: var(--color-input-bg); border: 1px solid transparent;
    border-radius: var(--radius-md); font-family: inherit; transition: all 0.2s;
}
input:focus, select:focus, textarea:focus { background-color: var(--color-surface); border-color: var(--color-text-main); outline: none; }
label { font-size: 0.8rem; font-weight: 700; margin-bottom: 0.5rem; display: block; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }

/* Font Picker Preview Card */
.font-preview-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    background: var(--color-bg);
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.font-preview-card:hover {
    background: var(--color-surface);
    border-color: var(--color-text-main);
}
.font-sample { font-size: 1.1rem; color: var(--color-text-main); }
.font-meta { display: flex; align-items: center; gap: 0.5rem; }

/* Modal Styles */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.2s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-container {
    background: var(--color-surface); width: 100%; max-width: 500px;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-modal);
    display: flex; flex-direction: column; max-height: 80vh;
}
.modal-header {
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--color-border);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { margin: 0; font-size: 1.1rem; }
.btn-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--color-text-muted); }
.modal-body { padding: 1.5rem; overflow-y: auto; }
.font-list { display: grid; gap: 0.5rem; margin-top: 1rem; }
.font-option {
    padding: 0.75rem 1rem; border-radius: var(--radius-md); cursor: pointer;
    font-size: 1.1rem; transition: background 0.2s;
}
.font-option:hover { background: var(--color-input-bg); }

/* Photo Upload */
.photo-upload-container { display: flex; align-items: center; gap: 1.5rem; }
.preview-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 1px solid var(--color-border); }
.preview-avatar.placeholder { background: var(--color-input-bg); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--color-text-muted); font-weight: 700; }
.photo-actions input { display: none; } /* Hide default file input */
.file-label { cursor: pointer; margin-bottom: 0.5rem; display: inline-flex; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; text-transform: none; font-weight: 500; margin-top: 0.5rem; }
.checkbox-label input { width: auto; margin: 0; }

/* Link Items */
.link-item {
    background: var(--color-input-bg); padding: 1rem; border-radius: var(--radius-md);
    display: grid; grid-template-columns: auto auto 1fr 1.5fr auto; gap: 0.75rem;
    align-items: center; margin-bottom: 0.75rem; border: 1px solid transparent;
}
.link-item:hover { border-color: var(--color-border); background: var(--color-surface); }
.drag-handle { cursor: grab; color: #999; font-size: 1.2rem; padding: 0 0.25rem; }
.btn-remove { background: transparent; border: none; cursor: pointer; color: #999; font-size: 1.25rem; width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.btn-remove:hover { background: #fee2e2; color: var(--color-error); }

/* Buttons */
.btn {
    display: inline-flex; justify-content: center; align-items: center;
    padding: 0.75rem 1.25rem; font-weight: 700; border-radius: var(--radius-pill);
    cursor: pointer; transition: all 0.2s; border: none; font-size: 0.9rem;
}
.btn-primary { background-color: var(--color-primary); color: white; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); opacity: 0.9; }
.btn-secondary { background: transparent; border: 1px solid var(--color-border); color: var(--color-text-main); }
.btn-secondary:hover { border-color: var(--color-text-main); }
.btn-text { background: transparent; color: var(--color-text-muted); padding: 0.5rem 1rem; }
.btn-text:hover { color: var(--color-text-main); }
.btn-sm { font-size: 0.85rem; padding: 0.5rem 1rem; }
.btn-large { font-size: 1rem; padding: 1rem 2rem; }

/* ===== Public Profile (GLASSMORPHISM) ===== */
.profile-page {
    min-height: 100vh; display: flex; flex-direction: column; align-items: center;
    padding: 4rem 1rem; color: white;
}
.profile-container { width: 100%; max-width: 600px; text-align: center; }
.profile-photo {
    width: 140px; height: 140px; border-radius: 50%; object-fit: cover;
    margin-bottom: 1.5rem; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.1);
}
.profile-name { font-size: 3rem; margin-bottom: 0.5rem; font-weight: 900; color: white; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.profile-bio { font-size: 1.125rem; color: rgba(255, 255, 255, 0.9); margin-bottom: 3rem; line-height: 1.6; max-width: 500px; margin-left: auto; margin-right: auto; }

/* Glass Buttons */
.link-button {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: white; padding: 1.25rem 2rem; margin-bottom: 1rem; border-radius: var(--radius-lg); 
    text-decoration: none; font-weight: 600; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative; overflow: hidden;
}
.link-button:hover {
    transform: translateY(-3px) scale(1.01); background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* Shine Animation */
@keyframes shine {
    0% { left: -100%; }
    100% { left: 200%; }
}

.link-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
}

.link-button:hover::after {
    animation: shine 0.75s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.link-arrow { opacity: 0.6; transition: transform 0.2s; }
.link-button:hover .link-arrow { transform: translateX(5px); opacity: 1; }
.link-button.featured {
    background: rgba(255, 215, 0, 0.1); border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15); color: #fbbf24;
}
.link-button.featured:hover { background: rgba(255, 215, 0, 0.2); box-shadow: 0 0 40px rgba(255, 215, 0, 0.3); }

/* Landing Page */
.landing-page { background: var(--color-surface); color: var(--color-text-main); }
.landing-container { max-width: 1200px; margin: 0 auto; padding: 2rem; min-height: 100vh; display: flex; flex-direction: column; }
.landing-nav { display: flex; justify-content: space-between; padding: 1rem 0; }
.logo-mark { font-weight: 900; font-size: 1.5rem; border: 2px solid black; padding: 0.25rem 0.5rem; }
.hero-section { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 4rem 0; }
.hero-title { font-size: clamp(3rem, 10vw, 6rem); line-height: 0.95; margin-bottom: 1.5rem; background: linear-gradient(180deg, #000 0%, #666 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-text { font-size: 1.25rem; color: var(--color-text-muted); max-width: 600px; margin-bottom: 3rem; }
.claim-form .input-group { display: flex; align-items: center; background: #fff; border: 1px solid var(--color-border); padding: 0.5rem; border-radius: 9999px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.prefix { padding-left: 1.5rem; color: #999; font-weight: 600; }
.claim-form input { border: none; background: transparent; padding: 1rem 0.5rem; font-size: 1.1rem; font-weight: 700; margin: 0; }
.btn-claim { background: #000; color: white; padding: 0.75rem 1.5rem; border-radius: 9999px; font-weight: 700; }

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .link-item { grid-template-columns: auto auto 1fr auto; }
    .link-item input[type="url"] { grid-column: 1 / -1; }
    .container.narrow { margin-top: 0; box-shadow: none; padding: 1.5rem; }
    .dashboard-header { flex-direction: column; gap: 1rem; align-items: stretch; }
    .header-actions { justify-content: flex-start; }
}

/* Footer (Clean & Corrected) */
.landing-footer { text-align: center; padding: 3rem 0; margin-top: auto; border-top: 1px solid var(--color-border); }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer-logo { height: 30px; width: auto; opacity: 0.8; transition: opacity 0.2s; }
.footer-logo-link:hover .footer-logo { opacity: 1; }
.landing-footer p { font-size: 0.85rem; color: var(--color-text-muted); margin: 0; }
