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

:root {
    --primary-color: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899; /* Pink */
    --accent-color: #8b5cf6; /* Violet */
    --bg-main: #fcfcfd;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.5);
    --alert-bg: #fff1f2;
    --alert-text: #e11d48;
    --alert-border: #fca5a5;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

h1, h2, h3, .counter {
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    background-color: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Clean Animated Ambient Background */
body::before {
    content: '';
    position: fixed;
    top: -50vw; left: -50vw; width: 200vw; height: 200vh;
    background: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.12), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.12), transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.12), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.12), transparent 40%);
    z-index: -2;
    animation: drift 20s ease-in-out infinite alternate;
}

@keyframes drift {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.05); }
    100% { transform: rotate(-5deg) scale(0.95); }
}

/* Main Layout */
.main-container {
    width: 100%;
    max-width: 950px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 10;
}

/* Premium Glass Card Base */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--shadow-lg), inset 0 2px 0 0 rgba(255, 255, 255, 0.7);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    box-shadow: var(--shadow-xl), inset 0 2px 0 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* Top Card Styles */
.top-card {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,250,252,0.8) 100%);
}

.card-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-content h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-content .subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: -0.2px;
}

/* Alert Banner */
.alert-banner {
    background: var(--alert-bg);
    color: var(--alert-text);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(252, 165, 165, 0.4);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.05);
    margin-top: 0.5rem;
}

.trumpet-icon {
    color: #f43f5e;
    font-size: 1.2rem;
    animation: gentle-bounce 2s infinite ease-in-out;
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.05); }
}

.marquee-wrapper {
    flex: 1;
}

.marquee-text {
    letter-spacing: -0.2px;
}

/* Stats */
.stats {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    color: var(--text-primary);
    padding: 0.6rem 1.25rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-sm);
    letter-spacing: -0.2px;
}

.stat-badge i {
    color: var(--primary-color);
}

.counter {
    font-weight: 800;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Bottom Grid Layout */
.bottom-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
}

/* Form Card */
.form-card {
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.form-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-card h2::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 24px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    border-radius: 6px;
}

.exchange-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.01);
    transform: translateY(-1px);
}

.input-wrapper .icon {
    position: absolute;
    left: 1.25rem;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
    font-size: 1.1rem;
}

.input-wrapper:focus-within .icon {
    color: var(--primary-color);
}

.input-wrapper input {
    width: 100%;
    padding: 1.1rem 1.25rem 1.1rem 3.5rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    font-weight: 500;
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    line-height: 1.5;
    margin-top: 0.25rem;
    margin-left: 0.25rem;
}

.block-text {
    margin: 0.5rem 0 1.5rem 0.25rem;
}

/* Buttons */
button {
    width: 100%;
    padding: 1.1rem;
    border-radius: 16px;
    border: none;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 0.5rem;
    letter-spacing: -0.2px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    filter: brightness(1.05);
}

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

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2.5rem 0;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider span {
    padding: 0 1rem;
}

/* Warranty Section */
.warranty-section {
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.3px;
}

.text-primary {
    color: var(--primary-color);
}

.secondary-btn {
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.secondary-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

/* Empty State / Right Card */
.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%);
    min-height: 100%;
}

.empty-placeholder {
    width: 75%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: placeholder-shimmer 2.5s infinite linear;
}

.skeleton-line.title {
    height: 24px;
    width: 60%;
    margin-bottom: 0.5rem;
    border-radius: 12px;
}

.skeleton-line.short {
    width: 45%;
}

@keyframes placeholder-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Animations */
.fade-in {
    animation: slideDownFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-up {
    opacity: 0;
    animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.slide-up-delay {
    opacity: 0;
    animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .main-container {
        padding: 1rem;
        gap: 1rem;
    }
    
    .bottom-grid {
        grid-template-columns: 1fr;
    }
    
    .top-card {
        padding: 2rem 1.5rem;
    }
    
    .form-card {
        padding: 2rem 1.5rem;
    }
    
    .header-content h1 {
        font-size: 2.25rem;
    }
    
    .empty-state {
        display: none;
    }
}
