/**
 * GenCalc - Components Stylesheet
 * Estilos de componentes específicos (Calculator, Modals, etc.)
 */
/**
 * GenCalc v0.0.11
 * Build: b30979ff
 */

/* ============================================
   FINANCE CALCULATOR SECTIONS
   ============================================ */

.finance-calculator {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
    animation: fadeInUp 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.finance-calculator.hidden {
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

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

/* ============================================
   CALCULATOR DISPLAY
   ============================================ */

.calculator-display {
    background: linear-gradient(
        135deg,
        rgba(17, 24, 39, 0.95) 0%,
        rgba(31, 41, 55, 0.98) 50%,
        rgba(17, 24, 39, 0.95) 100%
    );
    padding: var(--spacing-xl) var(--spacing-lg);
    border-radius: var(--radius-2xl);
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 -1px 2px rgba(139, 92, 246, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.2);
    margin: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    flex-shrink: 0;
    min-height: 130px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.calculator-display::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(139, 92, 246, 0.5),
        transparent
    );
}

.history-display {
    text-align: right;
    font-size: 3.75rem;
    color: #ffffff;
    font-weight: 300;
    height: 4rem;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    line-height: 1;
    font-family: var(--font-mono);
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    cursor: pointer;
    transition:
        opacity 0.2s ease,
        font-size 0.2s ease;
}

.history-display:hover {
    opacity: 0.8;
}

.main-display {
    text-align: right;
    font-size: 2.5rem;
    color: #10b981;
    font-weight: 700;
    height: 3rem;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    margin-top: var(--spacing-sm);
    font-family: var(--font-mono);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    transition: font-size 0.2s ease;
}

.main-display::-webkit-scrollbar {
    height: 4px;
}

/* ============================================
   CALCULATOR KEYPAD
   ============================================ */

.calculator-keypad {
    padding: var(--spacing-md) var(--spacing-lg);
    display: grid;
    gap: 0.875rem;
    flex: 1;
    align-content: stretch;
    padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom, 0px));
    /* Extra padding for iOS Safari to prevent button cut-off */
    padding-bottom: max(
        1.5rem,
        calc(var(--spacing-md) + env(safe-area-inset-bottom, 0px))
    );
    background: linear-gradient(
        180deg,
        rgba(17, 24, 39, 0.5) 0%,
        rgba(31, 41, 55, 0.3) 100%
    );
}

/* Layout para calculadora científica 5x5 */
.calculator-keypad.layout-scientific {
    grid-template-columns: repeat(5, 1fr);
}

/* Layout para calculadora básica 4x5 */
.calculator-keypad.layout-basic {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   CALCULATOR BUTTONS
   ============================================ */

.calc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.625rem;
    font-weight: 700;
    border: none;
    border-radius: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 75px;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.calc-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 1.25rem 1.25rem 0 0;
}

.calc-btn:active {
    transform: scale(0.96);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Números - Cinza Claro com gradiente */
.calc-btn-gray {
    background: linear-gradient(145deg, #d1d5db 0%, #9ca3af 100%);
    color: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.calc-btn-gray:hover {
    background: linear-gradient(145deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* Operações Especiais - Cinza Escuro com gradiente */
.calc-btn-dark {
    background: linear-gradient(145deg, #4b5563 0%, #374151 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.calc-btn-dark:hover {
    background: linear-gradient(145deg, #6b7280 0%, #4b5563 100%);
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

/* Operadores - Laranja com gradiente vibrante */
.calc-btn-orange {
    background: linear-gradient(145deg, #fb923c 0%, #f97316 50%, #ea580c 100%);
    color: white;
    border: 1px solid rgba(251, 146, 60, 0.5);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    box-shadow:
        0 4px 12px rgba(249, 115, 22, 0.4),
        0 0 20px rgba(249, 115, 22, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.calc-btn-orange:hover {
    background: linear-gradient(145deg, #fdba74 0%, #fb923c 50%, #f97316 100%);
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(249, 115, 22, 0.6),
        0 0 30px rgba(249, 115, 22, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Clear - Vermelho com gradiente vibrante */
.calc-btn-red {
    background: linear-gradient(145deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
    color: white;
    border: 1px solid rgba(248, 113, 113, 0.5);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    box-shadow:
        0 4px 12px rgba(239, 68, 68, 0.4),
        0 0 20px rgba(239, 68, 68, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.calc-btn-red:hover {
    background: linear-gradient(145deg, #fca5a5 0%, #f87171 50%, #ef4444 100%);
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(239, 68, 68, 0.6),
        0 0 30px rgba(239, 68, 68, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Igual - Verde com gradiente vibrante e brilho */
.calc-btn-green {
    background: linear-gradient(145deg, #34d399 0%, #10b981 50%, #059669 100%);
    color: white;
    border: 1px solid rgba(52, 211, 153, 0.5);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    box-shadow:
        0 4px 12px rgba(16, 185, 129, 0.5),
        0 0 20px rgba(16, 185, 129, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    animation: pulseGreen 3s ease-in-out infinite;
}

.calc-btn-green:hover {
    background: linear-gradient(145deg, #6ee7b7 0%, #34d399 50%, #10b981 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 24px rgba(16, 185, 129, 0.7),
        0 0 40px rgba(16, 185, 129, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

@keyframes pulseGreen {
    0%,
    100% {
        box-shadow:
            0 4px 12px rgba(16, 185, 129, 0.5),
            0 0 20px rgba(16, 185, 129, 0.3),
            inset 0 1px 2px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 4px 12px rgba(16, 185, 129, 0.7),
            0 0 30px rgba(16, 185, 129, 0.5),
            inset 0 1px 2px rgba(255, 255, 255, 0.25);
    }
}

/* Button Spans */
.calc-btn.col-span-2 {
    grid-column: span 2;
}

.calc-btn.col-span-3 {
    grid-column: span 3;
}

.calc-btn.col-span-4 {
    grid-column: span 4;
}

/* Botão = em full-width - estilo barra de espaço */
.calc-btn-green.col-span-4 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 1rem;
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    z-index: 9998;
    backdrop-filter: blur(4px);
    opacity: 1;
    visibility: visible;
    transition:
        opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        backdrop-filter 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, visibility;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-2xl);
    max-width: 28rem;
    width: 100%;
    box-shadow: var(--shadow-2xl);
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(0) scale(1) translateZ(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.modal.hidden .modal-content {
    transform: translateY(-20px) scale(0.95) translateZ(0);
}

/* Preload para evitar flash */
.modal.hidden {
    transition-delay: 0s;
}

/* ============================================
   MODAL HEADER
   ============================================ */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--bg-tertiary);
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.close-btn {
    background: #ef4444;
    border: none;
    color: white;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: 50%;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.close-btn:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.1);
}

.close-btn .icon {
    width: 24px;
    height: 24px;
}

/* ============================================
   MODAL BODY
   ============================================ */

.modal-body {
    padding: var(--spacing-xl);
}

/* ============================================
   SETTINGS MODAL
   ============================================ */

.setting-group {
    padding: var(--spacing-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.button-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.toggle-btn {
    flex: 0 1 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    position: relative;
    white-space: nowrap;
}

.toggle-btn:hover {
    background: var(--bg-quaternary);
    color: var(--text-primary);
}

.toggle-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.toggle-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pro-badge-small {
    font-size: 0.625rem !important;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: white !important;
    padding: 0.15rem 0.45rem !important;
    border-radius: 0.375rem !important;
    font-weight: 700 !important;
    margin-left: var(--spacing-xs) !important;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    overflow: hidden !important;
}

.pro-badge-small::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.tab-btn:hover .pro-badge-small::before,
.toggle-btn:hover .pro-badge-small::before {
    left: 100%;
}

/* ============================================
   PRO MODAL
   ============================================ */

.best-value-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: white;
    font-family: "Orbitron", var(--font-sans);
    font-size: 0.75rem;
    font-weight: 900;
    padding: 0.375rem 1rem;
    border-radius: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    box-shadow:
        0 0 20px rgba(239, 68, 68, 0.5),
        0 3px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.4);
    margin-bottom: var(--spacing-md);
    animation: badgePulse 1.5s ease-in-out infinite;
    position: relative;
    z-index: 2;
    will-change: transform, box-shadow;
    transform: translateZ(0);
}

@keyframes badgePulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 0 30px rgba(239, 68, 68, 0.6),
            0 4px 12px rgba(0, 0, 0, 0.4),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 0 45px rgba(239, 68, 68, 0.9),
            0 6px 18px rgba(0, 0, 0, 0.5),
            inset 0 1px 2px rgba(255, 255, 255, 0.4);
    }
}

.pro-modal-content {
    padding: var(--spacing-lg);
    text-align: center;
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.1) 0%,
        rgba(59, 130, 246, 0.1) 100%
    );
    border-radius: var(--radius-2xl);
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow:
        0 0 60px rgba(139, 92, 246, 0.3),
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.5) rgba(31, 41, 55, 0.3);
}

.pro-modal-content::-webkit-scrollbar {
    width: 8px;
}

.pro-modal-content::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.3);
    border-radius: 10px;
}

.pro-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #6366f1);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.pro-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a78bfa, #818cf8);
}

.pro-modal-content::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(139, 92, 246, 0.1) 50%,
        transparent 70%
    );
    animation: shimmer 3s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes shimmer {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.pro-title {
    font-family: "Orbitron", var(--font-sans);
    font-size: 1.75rem;
    font-weight: 900;
    background: linear-gradient(
        135deg,
        #fbbf24 0%,
        #f59e0b 25%,
        #8b5cf6 50%,
        #6366f1 75%,
        #3b82f6 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.02em;
    text-shadow:
        0 0 30px rgba(251, 191, 36, 0.5),
        0 0 60px rgba(139, 92, 246, 0.3);
    animation: titleShine 4s ease-in-out infinite;
    position: relative;
    z-index: 1;
    will-change: background-position, filter;
    transform: translateZ(0);
}

@keyframes titleShine {
    0%,
    100% {
        background-position: 0% 50%;
        filter: brightness(1);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.3);
    }
}

.pro-description {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.5;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pro-features {
    margin-bottom: var(--spacing-lg);
    text-align: left;
    position: relative;
    z-index: 1;
    display: grid;
    gap: var(--spacing-sm);
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: linear-gradient(
        135deg,
        rgba(31, 41, 55, 0.8),
        rgba(55, 65, 81, 0.6)
    );
    border-radius: var(--radius-lg);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pro-feature-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #8b5cf6, #6366f1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pro-feature-item:hover {
    transform: translateX(8px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow:
        0 8px 20px rgba(139, 92, 246, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

.pro-feature-item:hover::before {
    opacity: 1;
}

.checkmark {
    font-size: 1.5rem;
    flex-shrink: 0;
    display: inline-block;
    will-change: transform;
    transform: translateZ(0);
}

.pro-feature-item:nth-child(1) .checkmark {
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.8));
    animation: rocketFloat 2s ease-in-out infinite;
}

.pro-feature-item:nth-child(2) .checkmark {
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.8));
    animation: codeFlip 3s ease-in-out infinite;
}

.pro-feature-item:nth-child(3) .checkmark {
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.8));
    animation: chartBounce 2.5s ease-in-out infinite;
}

.pro-feature-item:nth-child(4) .checkmark {
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.8));
    animation: aiSpin 4s linear infinite;
}

.pro-feature-item:nth-child(5) .checkmark {
    filter: drop-shadow(0 0 12px rgba(236, 72, 153, 0.8));
    animation: paintPulse 2s ease-in-out infinite;
}

@keyframes rocketFloat {
    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-8px) rotate(5deg);
    }
}

@keyframes codeFlip {
    0%,
    100% {
        transform: rotateY(0deg) scale(1);
    }
    50% {
        transform: rotateY(180deg) scale(1.15);
    }
}

@keyframes chartBounce {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-6px) scale(1.1);
    }
    50% {
        transform: translateY(0) scale(1);
    }
    75% {
        transform: translateY(-3px) scale(1.05);
    }
}

@keyframes aiSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes paintPulse {
    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }
    33% {
        transform: scale(1.15) rotate(-10deg);
    }
    66% {
        transform: scale(1.15) rotate(10deg);
    }
}

.pro-feature-item p {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.01em;
}

.pro-price-box {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    padding: var(--spacing-md);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-lg);
    box-shadow:
        0 10px 30px rgba(139, 92, 246, 0.5),
        0 0 40px rgba(99, 102, 241, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: priceGlow 2s ease-in-out infinite;
    overflow: hidden;
    will-change: box-shadow;
    transform: translateZ(0);
}

.pro-price-box::before {
    content: "💎";
    position: absolute;
    top: 50%;
    left: -10%;
    transform: translateY(-50%);
    font-size: 8rem;
    opacity: 0.1;
    animation: lightningMove 3s ease-in-out infinite;
}

.pro-price-box::after {
    content: "💎";
    position: absolute;
    top: 50%;
    right: -10%;
    transform: translateY(-50%);
    font-size: 8rem;
    opacity: 0.1;
    animation: lightningMove 3s ease-in-out infinite reverse;
}

@keyframes priceGlow {
    0%,
    100% {
        box-shadow:
            0 10px 30px rgba(139, 92, 246, 0.5),
            0 0 40px rgba(99, 102, 241, 0.4),
            inset 0 2px 4px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow:
            0 15px 40px rgba(139, 92, 246, 0.7),
            0 0 60px rgba(99, 102, 241, 0.6),
            inset 0 2px 4px rgba(255, 255, 255, 0.4);
    }
}

@keyframes lightningMove {
    0%,
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-50%) scale(1.2);
        opacity: 0.15;
    }
}

.pro-price {
    font-family: "Orbitron", var(--font-sans);
    font-size: 1.125rem;
    font-weight: 900;
    color: white;
    margin: 0;
    letter-spacing: 0.05em;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
}

.pro-price .price-value {
    color: #00ff88;
    text-shadow:
        0 0 10px rgba(0, 255, 136, 0.8),
        0 0 20px rgba(0, 255, 136, 0.6),
        0 0 30px rgba(0, 255, 136, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.6);
    animation: priceGlow 2s ease-in-out infinite;
}

@keyframes priceGlow {
    0%,
    100% {
        text-shadow:
            0 0 10px rgba(0, 255, 136, 0.8),
            0 0 20px rgba(0, 255, 136, 0.6),
            0 0 30px rgba(0, 255, 136, 0.4),
            0 2px 8px rgba(0, 0, 0, 0.6);
    }
    50% {
        text-shadow:
            0 0 15px rgba(0, 255, 136, 1),
            0 0 30px rgba(0, 255, 136, 0.8),
            0 0 45px rgba(0, 255, 136, 0.6),
            0 2px 8px rgba(0, 0, 0, 0.6);
    }
}

/* ============================================
   SUCCESS MODAL
   ============================================ */

.success-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xxl);
    text-align: center;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 100px rgba(139, 92, 246, 0.4);
}

.fireworks-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: fireworkExplosion 1.5s ease-out infinite;
}

.firework:nth-child(1) {
    box-shadow:
        0 0 10px 2px #ffd700,
        0 0 20px 4px #ffed4e,
        0 0 30px 6px #ffc107,
        0 0 40px 8px #ff9800;
}

.firework:nth-child(2) {
    box-shadow:
        0 0 10px 2px #ff6b6b,
        0 0 20px 4px #ff5252,
        0 0 30px 6px #f44336,
        0 0 40px 8px #e91e63;
}

.firework:nth-child(3) {
    box-shadow:
        0 0 10px 2px #4ecdc4,
        0 0 20px 4px #26c6da,
        0 0 30px 6px #00bcd4,
        0 0 40px 8px #0097a7;
}

.firework:nth-child(4) {
    box-shadow:
        0 0 10px 2px #a8e6cf,
        0 0 20px 4px #81c784,
        0 0 30px 6px #66bb6a,
        0 0 40px 8px #4caf50;
}

.firework:nth-child(5) {
    box-shadow:
        0 0 10px 2px #b39ddb,
        0 0 20px 4px #9575cd,
        0 0 30px 6px #7e57c2,
        0 0 40px 8px #673ab7;
}

.firework:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.firework:nth-child(2) {
    top: 30%;
    left: 80%;
    animation-delay: 0.3s;
}

.firework:nth-child(3) {
    top: 60%;
    left: 15%;
    animation-delay: 0.6s;
}

.firework:nth-child(4) {
    top: 70%;
    left: 85%;
    animation-delay: 0.9s;
}

.firework:nth-child(5) {
    top: 40%;
    left: 50%;
    animation-delay: 1.2s;
}

@keyframes fireworkExplosion {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(20);
        opacity: 0.8;
    }
    100% {
        transform: scale(40);
        opacity: 0;
    }
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10%;
    animation: confettiFall 3s linear infinite;
}

.confetti:nth-child(1) {
    left: 10%;
    background: #ffd700;
    animation-delay: 0s;
}

.confetti:nth-child(2) {
    left: 20%;
    background: #ff6b6b;
    animation-delay: 0.2s;
}

.confetti:nth-child(3) {
    left: 30%;
    background: #4ecdc4;
    animation-delay: 0.4s;
}

.confetti:nth-child(4) {
    left: 40%;
    background: #a8e6cf;
    animation-delay: 0.6s;
}

.confetti:nth-child(5) {
    left: 50%;
    background: #ff6b6b;
    animation-delay: 0.8s;
}

.confetti:nth-child(6) {
    left: 60%;
    background: #ffd700;
    animation-delay: 1s;
}

.confetti:nth-child(7) {
    left: 70%;
    background: #4ecdc4;
    animation-delay: 1.2s;
}

.confetti:nth-child(8) {
    left: 80%;
    background: #a8e6cf;
    animation-delay: 1.4s;
}

.confetti:nth-child(9) {
    left: 90%;
    background: #ff6b6b;
    animation-delay: 1.6s;
}

.confetti:nth-child(10) {
    left: 15%;
    background: #ffd700;
    animation-delay: 1.8s;
}

.confetti:nth-child(11) {
    left: 25%;
    background: #4ecdc4;
    animation-delay: 2s;
}

.confetti:nth-child(12) {
    left: 35%;
    background: #a8e6cf;
    animation-delay: 2.2s;
}

.confetti:nth-child(13) {
    left: 45%;
    background: #ff6b6b;
    animation-delay: 2.4s;
}

.confetti:nth-child(14) {
    left: 55%;
    background: #ffd700;
    animation-delay: 2.6s;
}

.confetti:nth-child(15) {
    left: 65%;
    background: #4ecdc4;
    animation-delay: 2.8s;
}

.confetti:nth-child(16) {
    left: 75%;
    background: #a8e6cf;
    animation-delay: 0.3s;
}

.confetti:nth-child(17) {
    left: 85%;
    background: #ff6b6b;
    animation-delay: 0.5s;
}

.confetti:nth-child(18) {
    left: 95%;
    background: #ffd700;
    animation-delay: 0.7s;
}

.confetti:nth-child(19) {
    left: 5%;
    background: #4ecdc4;
    animation-delay: 0.9s;
}

.confetti:nth-child(20) {
    left: 22%;
    background: #a8e6cf;
    animation-delay: 1.1s;
}

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

.success-icon {
    font-size: 5rem;
    margin-bottom: var(--spacing-lg);
    animation: successBounce 0.6s ease-out;
    position: relative;
    z-index: 2;
}

@keyframes successBounce {
    0% {
        transform: scale(0) rotateZ(0deg);
    }
    50% {
        transform: scale(1.2) rotateZ(180deg);
    }
    100% {
        transform: scale(1) rotateZ(360deg);
    }
}

.success-title {
    font-family: "Orbitron", var(--font-sans);
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: titleShine 2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes titleShine {
    0%,
    100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

.success-message {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: var(--spacing-xl);
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.success-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    position: relative;
    z-index: 2;
}

.success-feature {
    background: rgba(139, 92, 246, 0.2);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    font-weight: 600;
    color: #ffffff;
    border: 2px solid rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    animation: featureFadeIn 0.5s ease-out backwards;
}

.success-feature:nth-child(1) {
    animation-delay: 0.1s;
}

.success-feature:nth-child(2) {
    animation-delay: 0.2s;
}

.success-feature:nth-child(3) {
    animation-delay: 0.3s;
}

.success-feature:nth-child(4) {
    animation-delay: 0.4s;
}

.success-feature:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes featureFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-feature:hover {
    background: rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.8);
    transform: translateY(-2px);
}

#close-success-btn {
    position: relative;
    z-index: 2;
    animation: buttonPulse 2s ease-in-out infinite;
}

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

/* ============================================
   MODAL ACTIONS & MESSAGES
   ============================================ */

.modal-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

.modal-message {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.modal-title span {
    vertical-align: middle;
}

#confirm-icon,
#notification-icon {
    font-size: 1.5rem;
    margin-right: var(--spacing-xs);
}

#notification-modal.loading #notification-ok-btn {
    display: none;
}

#notification-icon.loading {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
}

.about-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--color-primary);
    margin: 0;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

.about-version {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin: 0;
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: inline-block;
    align-self: center;
}

.about-version strong {
    color: var(--text-primary);
    font-weight: 700;
}

.about-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: var(--spacing-md) 0;
    padding: 0 var(--spacing-sm);
}

.about-made-with {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: var(--spacing-sm) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.heart-icon {
    font-size: 1.125rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%,
    100% {
        transform: scale(1);
    }
    10%,
    30% {
        transform: scale(1.1);
    }
    20%,
    40% {
        transform: scale(1);
    }
}

.about-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
}

.btn-contact {
    width: 100%;
    padding: 0.75rem var(--spacing-md);
    background: linear-gradient(
        145deg,
        var(--bg-secondary),
        rgba(31, 41, 55, 0.95)
    );
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--color-primary);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 6px 16px rgba(139, 92, 246, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-contact::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.1),
        rgba(59, 130, 246, 0.1)
    );
    opacity: 1;
    transition: opacity 0.3s ease;
}

.btn-contact::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(1);
    width: 80%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--color-primary),
        transparent
    );
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-contact:hover {
    background: linear-gradient(
        145deg,
        rgba(75, 85, 99, 0.8),
        rgba(55, 65, 81, 0.6)
    );
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow:
        0 8px 20px rgba(139, 92, 246, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.btn-contact:hover::before {
    opacity: 1;
}

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

/* ============================================
   ICONS
   ============================================ */

.icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.icon-inline {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    display: inline-block;
    vertical-align: middle;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 1s infinite;
}

/* ============================================
   TOUCH FEEDBACK
   ============================================ */

@media (hover: none) {
    .calc-btn:active,
    .btn-primary:active,
    .toggle-btn:active,
    .icon-btn:active {
        transform: scale(0.95);
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 640px) {
    .calculator-display {
        padding: var(--spacing-lg) var(--spacing-md);
        min-height: 110px;
        margin: var(--spacing-sm);
    }

    .main-display {
        font-size: 2.25rem;
        height: 2.75rem;
    }

    .history-display {
        font-size: 2.5rem;
        height: 3rem;
    }

    .main-display {
        font-size: 2rem;
        height: 2.5rem;
    }

    .calc-btn {
        padding: 0;
        font-size: 1.375rem;
        min-height: 65px;
        height: 100%;
        border-radius: 1rem;
    }

    .calculator-keypad {
        gap: 0.625rem;
        padding: var(--spacing-md);
        /* Extra padding for iOS Safari mobile browser */
        padding-bottom: max(
            2rem,
            calc(var(--spacing-md) + env(safe-area-inset-bottom, 0px) + 20px)
        );
    }

    .about-title {
        font-size: 1.5rem;
    }

    .about-subtitle {
        font-size: 1rem;
    }

    .about-description {
        font-size: 0.875rem;
    }

    .modal-content {
        max-width: 100%;
        margin: var(--spacing-sm);
    }

    .modal-header,
    .modal-body,
    .pro-modal-content {
        padding: var(--spacing-lg);
    }

    .pro-title {
        font-size: 1.5rem;
    }

    .pro-description {
        font-size: 0.9375rem;
    }

    .pro-price {
        font-size: 1rem;
    }

    .btn-purchase {
        font-size: 1rem;
        padding: var(--spacing-md);
    }

    .pro-feature-item {
        padding: var(--spacing-sm);
    }

    .checkmark {
        font-size: 1.25rem;
    }

    .success-modal-content {
        padding: var(--spacing-lg);
    }

    .success-icon {
        font-size: 3.5rem;
    }

    .success-title {
        font-size: 1.5rem;
    }

    .success-message {
        font-size: 1rem;
    }

    .success-features {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .success-feature {
        padding: var(--spacing-sm);
        font-size: 0.875rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }

    #confirm-icon,
    #notification-icon {
        font-size: 1.25rem;
    }

    .pro-feature-item p {
        font-size: 0.875rem;
    }

    .best-value-badge {
        font-size: 0.6875rem;
        padding: 0.3rem 0.75rem;
    }

    .pro-modal-content {
        padding: var(--spacing-md);
    }

    .setting-label {
        font-size: 1rem;
    }

    .toggle-btn {
        font-size: 0.75rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

@media (max-width: 374px) {
    .calculator-display {
        min-height: 100px;
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .main-display {
        font-size: 2rem;
    }

    .calc-btn {
        font-size: 1.25rem;
        min-height: 58px;
        height: 100%;
        border-radius: 0.875rem;
    }

    .tab-btn {
        font-size: 0.625rem;
        padding: 0.25rem 0.375rem;
    }

    .about-title {
        font-size: 1.375rem;
    }

    .btn-contact {
        font-size: 0.9375rem;
        padding: 0.625rem var(--spacing-sm);
    }
}

/* ============================================
   IOS SAFARI SPECIFIC FIX
   ============================================ */

/* Detecta iOS Safari e adiciona padding extra para evitar corte de botões */
@supports (-webkit-touch-callout: none) {
    .calculator-keypad {
        /* iOS Safari - padding extra para barra de navegação flutuante */
        padding-bottom: calc(
            var(--spacing-md) + env(safe-area-inset-bottom, 0px) + 30px
        ) !important;
    }

    @media (max-width: 640px) {
        .calculator-keypad {
            /* iOS Safari mobile - padding ainda maior */
            padding-bottom: calc(
                var(--spacing-md) + env(safe-area-inset-bottom, 0px) + 40px
            ) !important;
        }
    }

    @media (max-width: 390px) {
        .calculator-keypad {
            /* iOS Safari em telas menores (iPhone padrão) */
            padding-bottom: calc(
                var(--spacing-md) + env(safe-area-inset-bottom, 0px) + 35px
            ) !important;
        }
    }
}

/* ============================================
   LANDSCAPE MODE (Mobile)
   ============================================ */

@media (max-height: 600px) and (orientation: landscape) {
    .app-container {
        padding: 0;
    }

    .calculator-display {
        padding: var(--spacing-sm) var(--spacing-md);
        min-height: 70px;
        margin: var(--spacing-xs);
    }

    .main-display {
        font-size: 2rem;
        height: 2.5rem;
    }

    .calc-btn {
        min-height: 52px;
        padding: 0;
        font-size: 1.25rem;
        height: 100%;
        border-radius: 0.875rem;
    }

    .calculator-keypad {
        gap: 0.5rem;
        padding: var(--spacing-sm) var(--spacing-md);
        padding-bottom: max(
            1.5rem,
            calc(var(--spacing-sm) + env(safe-area-inset-bottom, 0px) + 15px)
        );
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    .calc-btn {
        border: 2px solid currentColor;
    }

    .tab-btn {
        border: 1px solid var(--border-color);
    }

    .input-field,
    .select-field,
    .textarea-field {
        border-width: 2px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .calc-btn:active {
        transform: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

/* ============================================
   GENNISYS BANNER
   ============================================ */

.gennisys-banner {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    transition: all var(--transition-normal);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: fit-content;
    margin: 0 auto;
}

.gennisys-banner::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;
}

.gennisys-banner:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.gennisys-banner:hover::before {
    left: 100%;
}

.gennisys-banner:active {
    transform: scale(0.98);
}

/* ============================================
   HISTORY MODAL
   ============================================ */

.history-list-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: var(--spacing-lg);
}

.history-empty-message {
    text-align: center;
    color: var(--text-secondary);
    padding: var(--spacing-xl);
    font-size: 0.9375rem;
}

.history-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.history-item {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    transition: all 0.2s ease;
    cursor: pointer;
}

.history-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(4px);
}

.history-item-expression {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.history-item-result {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.history-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md) 0;
}

.pagination-btn {
    background: var(--bg-secondary);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
}

.history-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    transform: translateY(-1px);
}

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

@media print {
    .app-header,
    .tab-navigation,
    .install-prompt,
    .modal {
        display: none !important;
    }

    .content-area {
        box-shadow: none;
        border: 1px solid #000;
    }

    body {
        background: white;
        color: black;
    }
}
