* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: 'VT323', monospace;
    user-select: none;
}

.calculator-body {
    background: linear-gradient(145deg, #3a3a3a 0%, #2a2a2a 50%, #1a1a1a 100%);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.5),
        0 10px 20px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -1px 0 rgba(0,0,0,0.3);
    max-width: 340px;
    width: 100%;
    position: relative;
}

.calculator-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
    border-radius: 24px;
    pointer-events: none;
}

.calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 0 5px;
}

.brand-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-name {
    font-family: 'Comic Neue', cursive;
    font-size: 14px;
    color: #888;
    letter-spacing: 0.5px;
}

.trust-badge {
    font-family: 'Comic Neue', cursive;
    font-size: 10px;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    transform: rotate(-2deg);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.honest-indicator {
    font-size: 10px;
    color: #fbbf24;
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.model-number {
    font-size: 11px;
    color: #555;
    font-family: 'VT323', monospace;
}

.display-container {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: 
        inset 0 4px 8px rgba(0,0,0,0.5),
        inset 0 1px 2px rgba(0,0,0,0.3);
}

.display-screen {
    background: linear-gradient(180deg, #2d3a2d 0%, #1f2a1f 100%);
    border-radius: 8px;
    padding: 15px 20px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
}

.display-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0,0,0,0.1) 0px,
            rgba(0,0,0,0.1) 1px,
            transparent 1px,
            transparent 3px
        );
    pointer-events: none;
}

.display-operation {
    font-size: 16px;
    color: #6b8f6b;
    margin-bottom: 5px;
    height: 20px;
}

.display-value {
    font-family: 'VT323', monospace;
    font-size: 48px;
    color: #7cb87c;
    text-shadow: 0 0 10px rgba(124, 184, 124, 0.5);
    letter-spacing: 2px;
    word-break: break-all;
    text-align: right;
    transition: all 0.1s ease;
}

.display-value.wink {
    animation: winkBounce 0.3s ease;
}

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

.button-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-button {
    font-family: 'VT323', monospace;
    font-size: 28px;
    border: none;
    border-radius: 12px;
    padding: 18px 10px;
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
    outline: none;
}

.calc-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.btn-digit {
    background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 100%);
    color: #fff;
    box-shadow: 
        0 4px 0 #2a2a2a,
        0 6px 10px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-digit:hover {
    background: linear-gradient(180deg, #5a5a5a 0%, #4a4a4a 100%);
}

.btn-digit.pressed,
.btn-digit:active {
    transform: translateY(3px);
    box-shadow: 
        0 1px 0 #2a2a2a,
        0 2px 5px rgba(0,0,0,0.2);
}

.btn-function {
    background: linear-gradient(180deg, #5a5a5a 0%, #4a4a4a 100%);
    color: #a0a0a0;
    box-shadow: 
        0 4px 0 #3a3a3a,
        0 6px 10px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-function:hover {
    background: linear-gradient(180deg, #6a6a6a 0%, #5a5a5a 100%);
}

.btn-function.pressed,
.btn-function:active {
    transform: translateY(3px);
    box-shadow: 
        0 1px 0 #3a3a3a,
        0 2px 5px rgba(0,0,0,0.2);
}

.btn-operator {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 
        0 4px 0 #b45309,
        0 6px 10px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-operator:hover {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
}

.btn-operator.pressed,
.btn-operator:active {
    transform: translateY(3px);
    box-shadow: 
        0 1px 0 #b45309,
        0 2px 5px rgba(0,0,0,0.2);
}

.btn-equals {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 
        0 4px 0 #1d4ed8,
        0 6px 10px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-equals:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}

.btn-equals.pressed,
.btn-equals:active {
    transform: translateY(3px);
    box-shadow: 
        0 1px 0 #1d4ed8,
        0 2px 5px rgba(0,0,0,0.2);
}

.btn-zero {
    grid-column: span 2;
}

.sneaky-swap {
    animation: subtleGlitch 0.1s ease;
}

@keyframes subtleGlitch {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

.stats-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 0 10px;
}

.calc-count {
    font-size: 11px;
    color: #555;
    font-family: 'VT323', monospace;
}

.suspicious-pixel {
    color: #ff6b6b;
    font-size: 8px;
    animation: sneakyBlink 3s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes sneakyBlink {
    0%, 90%, 100% { opacity: 0.3; }
    95% { opacity: 0.8; }
}

.app-footer {
    margin-top: 30px;
    text-align: center;
}

.disclaimer {
    font-family: 'Comic Neue', cursive;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
}

.remix-link {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #60a5fa;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.remix-link:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: #60a5fa;
}

@media (max-width: 380px) {
    .calculator-body {
        padding: 15px;
        border-radius: 20px;
    }
    
    .calc-button {
        padding: 15px 8px;
        font-size: 24px;
    }
    
    .display-value {
        font-size: 40px;
    }
    
    .button-grid {
        gap: 8px;
    }
}