/* 
 * VintedHelper - Premium Design System v2.0
 * Aesthetic: Premium White, Teal Gradients, Glassmorphism
 */

:root {
    /* Colors */
    --primary: #09B1BA;
    --primary-light: #0dcfda;
    --primary-dark: #078e95;
    --primary-glow: rgba(9, 177, 186, 0.15);
    --secondary: #0f172a;
    
    /* Neutral Palette - Premium White */
    --bg-main: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --surface: #ffffff;
    --border: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(255, 255, 255, 0.5);
    
    /* Text */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;
    
    /* Effects */
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    --glass-blur: blur(12px);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Layout Containers */
#app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Glass Components */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

/* Typography Overhaul */
h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons v2 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px var(--primary-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

/* App-Specific UI */
#view-container {
    flex: 1;
    padding: 24px;
    padding-bottom: 100px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

/* Camera Overlay v2 */
#camera-layer {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
}

.camera-focus-guide {
    width: 250px;
    height: 350px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.6);
}

.capture-btn {
    width: 80px;
    height: 80px;
    background: white;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

/* Utils */
/* Chatbot Premium Redesign */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.chat-btn {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px var(--primary-glow);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.chat-btn:hover {
    transform: scale(1.05) rotate(5deg);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-window.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.chat-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.msg-bot {
    background: white;
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.msg-user {
    background: var(--secondary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-input {
    padding: 16px;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

/* Exit Intent Premium */
.exit-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.exit-popup-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.exit-popup {
    background: white;
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-premium);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid var(--border);
}

.exit-popup-overlay.show .exit-popup {
    transform: scale(1);
}

.hidden { display: none !important; }
.premium-glow { position: absolute; width: 300px; height: 300px; background: var(--primary); filter: blur(150px); opacity: 0.15; z-index: -1; pointer-events: none; }

/* Entrance Animations */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: slideUpFade 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

#social-proof {
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-glow);
}

@media (max-width: 480px) {
    h1 { font-size: 2.1rem; }
    #view-container { padding: 20px; }
}
