/* --- DESIGN SYSTEM: 3D GLASSMORPHISM (MUTED PASTEL) --- */
:root {
    --bg-base: #F8FAFC; 
    
    /* Muted 3D Glass */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 1);
    --glass-shadow: 0 12px 32px rgba(31, 38, 135, 0.05);
    
    /* Text */
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    
    /* Muted Primary */
    --primary: #60A5FA;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body { 
    font-family: 'Inter', sans-serif; 
    background: var(--bg-base);
    color: var(--text-primary); 
    line-height: 1.5; 
    height: 100vh;
    display: flex;
    justify-content: center;
}

.app-container { width: 100%; max-width: 768px; height: 100vh; display: flex; flex-direction: column; position: relative; }

/* 3D Glass Background Orbs (Muted & Soft) */
.glass-bg-shape {
    position: fixed; border-radius: 50%; filter: blur(90px); opacity: 0.6; z-index: 0;
}
.shape-1 { top: -10%; left: -10%; width: 400px; height: 400px; background: #BAE6FD; } /* Soft Blue */
.shape-2 { bottom: 10%; right: -10%; width: 500px; height: 500px; background: #DDD6FE; } /* Soft Purple */
.shape-3 { top: 40%; left: 40%; width: 300px; height: 300px; background: #A7F3D0; } /* Soft Emerald */

/* Ensure content sits above background orbs */
main#view-container, .top-bar, .bottom-nav { z-index: 1; }
main#view-container { flex: 1; overflow-y: hidden; position: relative; }
.scroll-content { padding: 24px 20px; height: 100%; overflow-y: auto; padding-bottom: 140px; }

.view { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent; animation: fadeIn 0.3s; flex-direction: column; }
.view.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- HEADER (Glass) --- */
.top-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 24px; 
    background: rgba(255,255,255,0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02); z-index: 10;
}
.logo-container { text-align: center; }
.logo-text { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px;}
.logo-subtitle { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; color: var(--text-secondary); }
.header-actions { color: var(--text-secondary); font-size: 24px; }
.profile-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--glass-bg); border: 2px solid var(--glass-border); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

/* --- 3D GLASS CARDS --- */
.wizard-hero, .shortener-card, .builder-header, .builder-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.9), var(--glass-shadow);
}
.wizard-hero { border-radius: 24px; padding: 32px 24px; text-align: center; margin-bottom: 24px; }
.wizard-hero h2 { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -1px; }
.wizard-hero p { font-size: 16px; color: var(--text-secondary); margin-bottom: 24px; }

/* 3D Search Box */
.search-box {
    background: rgba(255,255,255,0.5); border-radius: 50px; display: flex; align-items: center; padding: 8px 20px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.03), 0 2px 0 rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.6); transition: all 0.3s;
}
.search-box:focus-within { background: rgba(255,255,255,0.9); box-shadow: inset 0 2px 5px rgba(0,0,0,0.01), 0 0 0 3px rgba(96, 165, 250, 0.2); }
.search-box i { font-size: 22px; color: var(--text-secondary); }
.search-box input { flex: 1; background: transparent; border: none; padding: 12px; font-size: 16px; font-weight: 600; outline: none; }

/* --- INFOGRAPHIC HORIZONTAL TIMELINE (3D Glass) --- */
h3 { font-size: 18px; font-weight: 800; margin-bottom: 16px; text-align: left; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); }

.quick-actions-grid { 
    display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 40px; 
    padding: 32px 24px 24px; margin: 0 -20px 32px; scrollbar-width: none; position: relative;
}
.quick-actions-grid::-webkit-scrollbar { display: none; }

/* Frosted glass connecting line */
.quick-actions-grid::before {
    content: ''; position: absolute; top: 64px; left: 40px; right: 40px; height: 6px;
    background: rgba(255,255,255,0.4); border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05), 0 1px 0 rgba(255,255,255,0.8); z-index: 0;
}

/* Soft Muted Pastels */
.quick-action-chip:nth-child(1) { --node-col: #99F6E4; } /* Soft Mint */
.quick-action-chip:nth-child(2) { --node-col: #BAE6FD; } /* Soft Sky */
.quick-action-chip:nth-child(3) { --node-col: #E9D5FF; } /* Soft Lavender */
.quick-action-chip:nth-child(4) { --node-col: #FDE68A; } /* Soft Sand */
.quick-action-chip:nth-child(5) { --node-col: #BFDBFE; } /* Soft Blue */
.quick-action-chip:nth-child(6) { --node-col: #BBF7D0; } /* Soft Sage */
.quick-action-chip { --node-col: #BAE6FD; }

.quick-action-chip { flex: 0 0 auto; background: transparent; border: none; display: flex; flex-direction: column; align-items: center; gap: 20px; cursor: pointer; position: relative; z-index: 1; }

/* 3D Glass Node Core */
.quick-action-chip i {
    width: 64px; height: 64px; border-radius: 50%; 
    background: rgba(255,255,255,0.9); backdrop-filter: blur(8px);
    color: var(--text-primary); font-size: 26px; display: flex; align-items: center; justify-content: center;
    position: relative; transition: transform 0.3s;
    /* 3D layers: Inner glare, gap, muted colored outer ring, soft drop shadow */
    box-shadow: 
        inset 0 4px 6px rgba(255,255,255,1), 
        0 0 0 4px rgba(255,255,255,0.4), 
        0 0 0 8px var(--node-col), 
        0 12px 24px rgba(0,0,0,0.08);
}
.quick-action-chip:hover i { transform: translateY(-4px); }
.quick-action-chip span { font-size: 13px; font-weight: 800; color: var(--text-primary); text-align: center; white-space: nowrap; text-shadow: 0 1px 2px rgba(255,255,255,0.8); }

/* --- INFOGRAPHIC HORIZONTAL BANNERS (3D Glass) --- */
.type-cards-list { display: flex; flex-direction: column; gap: 24px; padding: 16px 0; }

.type-card:nth-child(1) { --card-col: #BAE6FD; }
.type-card:nth-child(2) { --card-col: #99F6E4; }
.type-card:nth-child(3) { --card-col: #BFDBFE; }
.type-card { --card-col: #E9D5FF; }

.type-card {
    background: var(--glass-bg); backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border); border-radius: 60px;
    padding: 8px 40px 8px 8px; display: flex; align-items: center; gap: 24px;
    position: relative; overflow: hidden; cursor: pointer; transition: transform 0.2s;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.9), var(--glass-shadow);
}
.type-card:hover { transform: translateX(6px); }

/* Soft Muted Cap */
.type-card::after {
    content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 24px;
    background: var(--card-col); border-radius: 0 60px 60px 0; opacity: 0.7;
}

/* 3D Glass Head Icon */
.type-card .type-icon { 
    width: 64px; height: 64px; border-radius: 50%; 
    background: #FFFFFF; color: var(--text-primary); 
    display: flex; align-items: center; justify-content: center; font-size: 26px; 
    border: 4px solid var(--card-col); 
    position: relative; z-index: 2;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05), 0 4px 10px rgba(0,0,0,0.05);
}
.type-info { flex: 1; position: relative; z-index: 2; }
.type-info h4 { font-size: 18px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.5px;}
.type-info p { font-size: 14px; color: var(--text-secondary); }

/* --- SHORTENER MODULE (Glass) --- */
.shortener-card { padding: 40px 24px; border-radius: 24px; margin-bottom: 32px; }
.shortener-card::before { content: ''; position: absolute; top: 0; left: 24px; right: 24px; height: 4px; background: var(--primary); border-radius: 0 0 10px 10px; opacity: 0.5; }
.input-group { margin-bottom: 24px; }
.input-group label { display: block; font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.text-input { 
    width: 100%; padding: 16px; border-radius: 12px; 
    background: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.8);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); color: var(--text-primary); font-size: 16px; font-weight: 600; transition: all 0.3s; 
}
.text-input:focus { background: rgba(255,255,255,0.9); outline: none; border-color: var(--primary); box-shadow: 0 4px 15px rgba(96, 165, 250, 0.2); }

/* 3D Glass Buttons */
.primary-button {
    background: var(--primary); color: #FFFFFF; border: none; border-radius: 50px;
    padding: 18px 32px; font-size: 16px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), 0 8px 16px rgba(96, 165, 250, 0.3); transition: all 0.2s;
}
.primary-button:hover { transform: translateY(-2px); box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), 0 12px 24px rgba(96, 165, 250, 0.4); }
.primary-button:active { transform: scale(0.98); }

.secondary-button {
    background: rgba(255,255,255,0.8); color: var(--text-primary); border: 1px solid var(--glass-border); border-radius: 50px; padding: 16px 32px; font-size: 16px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.secondary-button:hover { background: #FFFFFF; box-shadow: 0 8px 15px rgba(0,0,0,0.05); }
.full-width { width: 100%; }

/* --- BOTTOM NAV (Glass) --- */
.bottom-nav {
    display: flex; justify-content: space-around; 
    background: rgba(255,255,255,0.8); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    padding: 16px 0 24px; position: fixed; bottom: 0; width: 100%; max-width: 768px;
    border-top: 1px solid rgba(255,255,255,0.8); box-shadow: 0 -10px 30px rgba(0,0,0,0.03); z-index: 100;
}
.bottom-nav.hidden { display: none; }
.nav-item { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-secondary); cursor: pointer; flex: 1; transition: all 0.3s; }
.nav-item i { font-size: 24px; transition: transform 0.3s; }
.nav-item span { font-size: 12px; font-weight: 800; }
.nav-item.active { color: var(--primary); }
.nav-item.active i { transform: translateY(-4px); }

/* --- UTILITIES & MODALS --- */
.stacked-module { display: block; animation: fadeIn 0.4s ease; }
.hidden { display: none !important; }

/* 3D Glass Dropdown */
.notification-dropdown {
    position: absolute; top: 50px; right: 0; width: 320px;
    background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
    border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    z-index: 100; overflow: hidden; border: 1px solid rgba(255,255,255,1);
    animation: fadeIn 0.2s ease; text-align: left;
}
.notif-header { padding: 16px 20px; font-size: 16px; font-weight: 800; border-bottom: 1px solid rgba(0,0,0,0.05); background: rgba(255,255,255,0.5); }
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item { padding: 16px 20px; display: flex; gap: 12px; border-bottom: 1px solid rgba(0,0,0,0.02); cursor: pointer; transition: background 0.2s; }
.notif-item:hover { background: rgba(255,255,255,0.5); }
.notif-item.unread { background: rgba(96, 165, 250, 0.05); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }
.notif-content h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.notif-content p { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

/* 3D Glass Auth Modal */
.auth-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px;
}
.auth-modal-content {
    background: rgba(255,255,255,0.85); backdrop-filter: blur(24px); border: 1px solid rgba(255,255,255,1);
    border-radius: 24px; padding: 32px; width: 100%; max-width: 400px; position: relative;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.9), 0 20px 50px rgba(0,0,0,0.15);
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); text-align: center;
}
.close-modal-btn {
    position: absolute; top: 16px; right: 16px;
    background: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.8);
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.close-modal-btn:hover { background: #FFFFFF; color: var(--text-primary); }
.auth-header h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.auth-header p { font-size: 15px; color: var(--text-secondary); margin-bottom: 24px; }
.auth-buttons { display: flex; flex-direction: column; gap: 12px; }
.auth-btn { width: 100%; padding: 16px; border-radius: 50px; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; transition: all 0.2s; border: none; }
.google-btn { background: #FFFFFF; color: var(--text-primary); border: 1px solid rgba(0,0,0,0.1); box-shadow: 0 4px 10px rgba(0,0,0,0.03); }
.google-btn:hover { box-shadow: 0 6px 15px rgba(0,0,0,0.05); transform: translateY(-1px); }
.google-btn i { color: #EA4335; font-size: 20px; }

/* Suggestion Area */
.suggestion-area { margin-top: 16px; animation: fadeIn 0.3s; }
.suggestion-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-align: left; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.primary-suggestion { --card-col: #BAE6FD; margin-bottom: 0; width: 100%; text-align: left; }

/* Builders / Minimal adjustments */
.builder-header { display: flex; justify-content: space-between; align-items: center; padding: 24px; z-index: 5; border-bottom: none; border-radius: 0 0 24px 24px; }
.builder-title h3 { margin: 0; font-size: 18px; color: var(--text-primary); text-transform: none; text-align: center; }
.progress-text { font-size: 14px; color: var(--primary); font-weight: 800; text-align: center; }
.progress-bar-container { height: 8px; background: rgba(255,255,255,0.5); width: 100%; border-radius: 10px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); }
.progress-bar-fill { height: 100%; background: var(--primary); width: 33%; transition: width 0.3s ease; border-radius: 10px; }
.builder-content { padding: 32px 24px 120px; }
.builder-footer { position: fixed; bottom: 0; width: 100%; max-width: 768px; padding: 20px 24px; display: flex; gap: 16px; border-radius: 32px 32px 0 0; }
.step-guide { margin-bottom: 32px; text-align: left; }
.step-guide h4 { font-size: 24px; font-weight: 800; margin-bottom: 8px;}
.step-guide p { color: var(--text-secondary); font-size: 15px; font-weight: 500;}
.color-input { width: 100%; height: 60px; border: 1px solid rgba(255,255,255,0.8); border-radius: 12px; padding: 4px; cursor: pointer; background: rgba(255,255,255,0.5); }
.icon-btn { background: none; border: none; font-size: 24px; color: var(--text-secondary); cursor: pointer; padding: 8px; border-radius: 50%; transition: color 0.2s; }
.icon-btn:hover { color: var(--primary); }

.style-picker-container { display: flex; overflow-x: auto; gap: 24px; padding: 12px 0 24px; scrollbar-width: none;}
.style-picker-container::-webkit-scrollbar { display: none; } 
.style-btn { flex: 0 0 auto; width: 80px; height: 80px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.8); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--text-secondary); transition: all 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.02);}
.style-btn.active { border-color: var(--primary); color: var(--primary); box-shadow: 0 10px 20px rgba(96, 165, 250, 0.2); }

/* --- PDF GENERATOR STYLES --- */
.pdf-preview-item {
    position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), 0 4px 10px rgba(0,0,0,0.05);
}
.pdf-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.pdf-preview-remove, .pdf-preview-action {
    background: rgba(255,255,255,0.9); color: var(--text-primary);
    width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(0,0,0,0.05); cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: all 0.2s;
}
.pdf-preview-remove { color: #ef4444; }
.pdf-preview-remove:hover { transform: scale(1.1); background: #ef4444; color: #fff; }
.pdf-preview-action:hover { transform: scale(1.1); background: var(--primary); color: #fff; }

/* --- ADSPH ATTRIBUTION --- */
.adsph-attribution {
    text-align: center;
    padding: 40px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}
.adsph-attribution .attribution-text {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}
.adsph-attribution img {
    height: 45px;
    object-fit: contain;
    margin: 4px 0;
}
.adsph-attribution a {
    color: #4ade80;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}
.adsph-attribution a:hover {
    opacity: 0.8;
}

/* --- CONVERTER CHIP GRID & WORKSPACE --- */
.converter-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}
.converter-chip {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.converter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(96, 165, 250, 0.15);
}
.converter-chip:active {
    transform: translateY(0);
}

