@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;700;800&family=Playfair+Display:wght@700;900&display=swap');

:root {
    --obsidian: #080808;
    --gold: #D4AF37;
    --gold-light: #F1D592;
    --gold-deep: #8A6D1D;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --glass-white: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(212, 175, 55, 0.2);
    --glass-blur: blur(25px);
    --text-main: #f5f5f5;
    --text-dim: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--obsidian);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

/* Background Estético */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 0% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
        linear-gradient(to bottom, #080808, #111);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 25px;
    position: relative;
}

/* Header Supreme */
.main-header {
    text-align: center;
    padding: 50px 0 40px;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 8px;
}

.gold-icon {
    font-size: 2.2rem;
    color: var(--gold);
    filter: drop-shadow(0 0 15px var(--gold-glow));
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Section Cards */
.glass-card {
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 28px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--card-shadow);
}

.input-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.input-full {
    grid-column: 1 / -1;
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    font-size: 0.7rem;
    color: var(--gold-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

input,
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(212, 175, 55, 0.5);
    /* Bordas mais acesas e grossas */
    border-radius: 14px;
    padding: 14px 18px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: var(--transition);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.1);
    /* Brilho permanente suave */
}

input:focus,
select:focus {
    border-color: var(--gold);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
    /* Brilho intenso no foco */
}

/* Custom Select Arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23D4AF37' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 24px;
}

.actions {
    display: flex;
    gap: 12px;
}

.btn-premium {
    flex: 1;
    padding: 16px;
    border-radius: 18px;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-premium.gold {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #000;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.btn-premium.gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
}

.btn-premium:active {
    transform: translateY(1px) scale(0.98);
}

.btn-icon {
    width: 60px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 18px;
    cursor: pointer;
    font-size: 1.3rem;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--error);
    color: white;
}

/* Results Section */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.results-header h3 {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 2px;
}

.badge {
    background: var(--gold);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    color: #000;
    font-weight: 800;
}

.comparison-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    transition: var(--transition);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.item-card.best {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.best-badge {
    position: absolute;
    top: -10px;
    left: 25px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    color: #000;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.savings-label {
    position: absolute;
    bottom: -10px;
    right: 25px;
    background: var(--success);
    color: #000;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.item-info .title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.item-info .sub-price {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 500;
}

.item-value {
    text-align: right;
    margin-right: 15px;
}

.price-std {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-main);
}

.item-card.best .price-std {
    color: var(--gold-light);
    text-shadow: 0 0 15px var(--gold-glow);
}

.per-unit {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.delete-btn {
    background: none;
    border: none;
    color: #444;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.delete-btn:hover {
    color: var(--error);
    transform: scale(1.2);
}

.empty-state {
    text-align: center;
    padding: 80px 0;
    color: #222;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* Mobile Tweak */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .item-card {
        padding: 18px 20px;
    }
}