/* ===== FONTE E BASE ===== */
body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* ===== FUNDO ANIMADO COM PADRÃO ===== */
.bg-pattern {
    background-image:
        radial-gradient(circle at 20% 80%, rgba(139, 69, 19, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 69, 19, 0.05) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238B4513' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.dark .bg-pattern {
    background-image:
        radial-gradient(circle at 20% 80%, rgba(217, 119, 6, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(217, 119, 6, 0.05) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D97706' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ===== EMOJIS FLUTUANTES DE FUNDO ===== */
.floating-emoji {
    position: fixed;
    font-size: 2rem;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(10deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(20px) rotate(-10deg); }
}

/* ===== ANIMAÇÕES DE EMOJIS ===== */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes pop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

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

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(217, 119, 6, 0.5); }
    50% { box-shadow: 0 0 20px rgba(217, 119, 6, 0.8), 0 0 30px rgba(217, 119, 6, 0.4); }
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes explosion {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); opacity: 0; }
}

/* ===== CLASSES DE ANIMAÇÃO ===== */
.animate-bounce-slow {
    animation: bounce 2s ease-in-out infinite;
}

.animate-wiggle {
    animation: wiggle 1s ease-in-out infinite;
}

.animate-pulse-emoji {
    animation: pulse 1.5s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin 3s linear infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-pop {
    animation: pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out forwards;
}

.animate-slide-down {
    animation: slideDown 0.5s ease-out forwards;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* ===== HEADER ANIMADO ===== */
.logo-emoji {
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
    transition: transform 0.3s;
}

.logo-emoji:hover {
    animation: wiggle 0.5s ease-in-out;
    transform: scale(1.3);
}

.title-text {
    background: linear-gradient(135deg, #8B4513, #D2691E, #CD853F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .title-text {
    background: linear-gradient(135deg, #F59E0B, #FBBF24, #FCD34D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== TEMA TOGGLE ANIMADO ===== */
.theme-toggle {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: rotate(180deg) scale(1.2);
}

.theme-toggle::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.theme-toggle:hover::after {
    opacity: 1;
}

/* ===== CARDS DE ITENS ===== */
.item-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.item-card:hover::before {
    left: 100%;
}

.item-card:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.item-card.danger {
    border-left-color: #EF4444;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), transparent);
}

.item-card.warning {
    border-left-color: #F59E0B;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), transparent);
}

.item-card.caution {
    border-left-color: #EAB308;
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.1), transparent);
}

.item-card.safe {
    border-left-color: #22C55E;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.1), transparent);
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s;
}

.status-badge.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #DC2626;
    animation: pulse 1s ease-in-out infinite;
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #D97706;
}

.status-badge.caution {
    background: rgba(234, 179, 8, 0.2);
    color: #CA8A04;
}

.status-badge.safe {
    background: rgba(34, 197, 94, 0.2);
    color: #16A34A;
}

.dark .status-badge.danger { color: #FCA5A5; }
.dark .status-badge.warning { color: #FCD34D; }
.dark .status-badge.caution { color: #FDE047; }
.dark .status-badge.safe { color: #86EFAC; }

/* ===== BARRA DE PROGRESSO ANIMADA ===== */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background: #E5E7EB;
    overflow: hidden;
    position: relative;
}

.dark .progress-bar {
    background: #374151;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes shimmer-slow {
    0% { transform: translateX(-200%) skewX(-12deg); }
    100% { transform: translateX(200%) skewX(-12deg); }
}

.animate-shimmer-slow {
    animation: shimmer-slow 4s ease-in-out infinite;
}

/* ===== CTA SECTION ===== */
.cta-section {
    position: relative;
    transition: all 0.3s ease;
}

.cta-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    padding: 3px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), transparent, rgba(255,255,255,0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.progress-fill.danger { background: linear-gradient(90deg, #EF4444, #DC2626); }
.progress-fill.warning { background: linear-gradient(90deg, #F59E0B, #D97706); }
.progress-fill.caution { background: linear-gradient(90deg, #EAB308, #CA8A04); }
.progress-fill.safe { background: linear-gradient(90deg, #22C55E, #16A34A); }

/* ===== FORMULÁRIO ===== */
.input-field {
    transition: all 0.3s;
    border: 2px solid transparent;
}

.input-field:focus {
    border-color: #D97706;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.2);
    transform: scale(1.02);
}

.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    background: linear-gradient(135deg, #D97706, #B45309);
}

.btn-primary::before {
    content: '💩';
    position: absolute;
    top: 50%;
    left: -30px;
    transform: translateY(-50%);
    font-size: 1.2rem;
    transition: left 0.3s;
}

.btn-primary:hover::before {
    left: 10px;
}

.btn-primary:hover {
    padding-left: 2.5rem;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(217, 119, 6, 0.4);
}

.btn-primary:active {
    transform: scale(0.95);
}

/* ===== MODAL ===== */
.modal-backdrop {
    backdrop-filter: blur(5px);
    transition: opacity 0.3s;
}

.modal-content {
    animation: modalPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalPop {
    0% { transform: scale(0.5) rotate(-5deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.modal-content.closing {
    animation: modalClose 0.3s ease-in forwards;
}

@keyframes modalClose {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.5) rotate(5deg); opacity: 0; }
}

/* ===== SLIDER PERSONALIZADO ===== */
#rating-input {
    -webkit-appearance: none;
    appearance: none;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #22C55E 0%, #EAB308 40%, #F59E0B 60%, #EF4444 100%);
    outline: none;
    transition: all 0.3s;
}

#rating-input:hover {
    transform: scaleY(1.3);
}

#rating-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 4px solid #D97706;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

#rating-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.5);
}

#rating-input::-webkit-slider-thumb:active {
    transform: scale(0.9);
}

#rating-input::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 4px solid #D97706;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.dark #rating-input::-webkit-slider-thumb {
    background: #1F2937;
    border-color: #FBBF24;
}

.dark #rating-input::-moz-range-thumb {
    background: #1F2937;
    border-color: #FBBF24;
}

/* ===== RATING VALUE ===== */
.rating-display {
    font-size: 4rem;
    font-weight: 800;
    transition: all 0.3s;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.rating-display.low { color: #22C55E; }
.rating-display.medium { color: #EAB308; }
.rating-display.high { color: #F59E0B; }
.rating-display.extreme {
    color: #EF4444;
    animation: shake 0.5s ease-in-out infinite;
}

/* ===== EMOJI REACTIONS ===== */
.emoji-indicator {
    font-size: 3rem;
    transition: all 0.3s;
}

.emoji-indicator.pulsing {
    animation: pulse 0.5s ease-in-out infinite;
}

/* ===== SCORE CIRCLE ===== */
.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    transition: all 0.3s;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid currentColor;
    opacity: 0.3;
}

.score-circle.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.score-circle.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.score-circle.caution {
    background: rgba(234, 179, 8, 0.2);
    color: #EAB308;
}

.score-circle.safe {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

/* ===== CONFETTI ===== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    font-size: 2rem;
    animation: confettiFall 3s ease-in forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-emoji {
    font-size: 5rem;
    animation: bounce 2s ease-in-out infinite;
}

/* ===== TOOLTIP ===== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1F2937;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.tooltip:hover::after {
    transform: translateX(-50%) translateY(-5px);
    opacity: 1;
    visibility: visible;
}

/* ===== DELETE BUTTON ===== */
.delete-btn {
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s;
}

.item-card:hover .delete-btn {
    opacity: 1;
    transform: scale(1);
}

.delete-btn:hover {
    transform: scale(1.2) rotate(10deg);
}

/* ===== NOTIFICATION TOAST ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    background: #1F2937;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: toastSlide 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
}

.toast.success { background: linear-gradient(135deg, #22C55E, #16A34A); }
.toast.warning { background: linear-gradient(135deg, #F59E0B, #D97706); }
.toast.danger { background: linear-gradient(135deg, #EF4444, #DC2626); }

@keyframes toastSlide {
    0% { transform: translateX(100%) scale(0); }
    100% { transform: translateX(0) scale(1); }
}

.toast.hiding {
    animation: toastHide 0.3s ease-in forwards;
}

@keyframes toastHide {
    0% { transform: translateX(0) scale(1); opacity: 1; }
    100% { transform: translateX(100%) scale(0); opacity: 0; }
}

/* ===== MASCOTE ===== */
.mascot {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    font-size: 3rem;
    cursor: pointer;
    transition: transform 0.3s;
    z-index: 100;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.mascot:hover {
    transform: scale(1.3) rotate(-10deg);
    animation: wiggle 0.5s ease-in-out;
}

.mascot.celebrating {
    animation: bounce 0.5s ease-in-out 3;
}

/* ===== HEADER SUBTITLE ===== */
.subtitle {
    font-size: 0.875rem;
    opacity: 0.7;
    animation: slideUp 0.5s ease-out 0.2s both;
}

/* ===== STAGGER ANIMATION FOR LIST ===== */
.stagger-item {
    opacity: 0;
    animation: slideUp 0.5s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.15s; }
.stagger-item:nth-child(3) { animation-delay: 0.2s; }
.stagger-item:nth-child(4) { animation-delay: 0.25s; }
.stagger-item:nth-child(5) { animation-delay: 0.3s; }
.stagger-item:nth-child(6) { animation-delay: 0.35s; }
.stagger-item:nth-child(7) { animation-delay: 0.4s; }
.stagger-item:nth-child(8) { animation-delay: 0.45s; }
.stagger-item:nth-child(9) { animation-delay: 0.5s; }
.stagger-item:nth-child(10) { animation-delay: 0.55s; }

/* ===== VOTE COUNTER ===== */
.vote-counter {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6B7280;
}

.vote-counter .vote-icon {
    animation: bounce 1s ease-in-out infinite;
    animation-delay: calc(var(--index) * 0.1s);
}

/* ===== SHARE BUTTONS ===== */
.share-btn-small {
    position: relative;
    overflow: hidden;
}

.share-btn-small::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.share-btn-small:hover::after {
    transform: translateX(100%);
}

/* ===== SOCIAL SHARE BUTTONS ===== */
.share-social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    background: #F3F4F6;
}

.dark .share-social-btn {
    background: #374151;
}

.share-social-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.share-social-btn:active {
    transform: scale(0.95);
}

.share-social-btn.whatsapp:hover {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.share-social-btn.twitter:hover {
    background: linear-gradient(135deg, #1DA1F2, #0C85D0);
    color: white;
}

.share-social-btn.facebook:hover {
    background: linear-gradient(135deg, #1877F2, #0C5DC7);
    color: white;
}

.share-social-btn.telegram:hover {
    background: linear-gradient(135deg, #0088CC, #006699);
    color: white;
}

/* ===== SHARE CARD PREVIEW ===== */
.share-card-preview {
    border: 2px dashed rgba(0, 0, 0, 0.1);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .share-card-preview {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ===== SHARE CARD (para gerar imagem) ===== */
.share-card {
    width: 400px;
    padding: 24px;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A, #FCD34D);
    border-radius: 24px;
    font-family: 'Inter', sans-serif;
    color: #1F2937;
}

.share-card-header {
    text-align: center;
    margin-bottom: 16px;
}

.share-card-logo {
    font-size: 48px;
    margin-bottom: 8px;
}

.share-card-title {
    font-size: 24px;
    font-weight: 800;
    color: #92400E;
}

.share-card-subtitle {
    font-size: 12px;
    color: #B45309;
    opacity: 0.8;
}

.share-card-item {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.share-card-item-name {
    font-weight: 700;
    font-size: 16px;
}

.share-card-item-status {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 9999px;
}

.share-card-item-score {
    font-size: 24px;
    font-weight: 800;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-card-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 10px;
    color: #92400E;
    opacity: 0.6;
}

/* ===== ITEM CARD SHARE BUTTON ===== */
.item-share-btn {
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s;
}

.item-card:hover .item-share-btn {
    opacity: 1;
    transform: scale(1);
}

.item-share-btn:hover {
    transform: scale(1.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .mascot {
        font-size: 2rem;
    }

    .score-circle {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .rating-display {
        font-size: 3rem;
    }

    .share-social-btn {
        padding: 0.5rem;
    }

    .share-social-btn span:first-child {
        font-size: 1.5rem;
    }

    .share-card {
        width: 320px;
        padding: 16px;
    }
}
