@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    background-color: #FFD700;
    min-height: 100vh;
    font-family: 'Press Start 2P', cursive;
    color: #000;
    overflow-x: hidden;
    position: relative;
}

/* 像素风格边框效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
    pointer-events: none;
    z-index: 1000;
}

/* 右上角更新提示框 */
.update-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    animation: float 3s ease-in-out infinite;
}

.notice-content {
    background: #FFF;
    border: 5px solid #000;
    padding: 15px 20px;
    box-shadow: 
        6px 6px 0px #FF6B00,
        12px 12px 0px rgba(0,0,0,0.3);
    transform: rotate(2deg);
    max-width: 280px;
}

.notice-title {
    font-size: 0.7rem;
    color: #FF0000;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 8px;
    line-height: 1.5;
}

.notice-text {
    font-size: 0.6rem;
    color: #000;
    text-shadow: 1px 1px 0px #FF6B00;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 标题区域 */
.header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
    position: relative;
}

.title {
    font-size: 2.5rem;
    color: #000;
    text-shadow: 
        4px 4px 0px #FF6B00,
        8px 8px 0px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    animation: bounce 2s infinite;
    line-height: 1.4;
}

.subtitle {
    font-size: 1.2rem;
    color: #000;
    text-shadow: 2px 2px 0px #FF6B00;
    margin-bottom: 15px;
}

/* 计算框样式 */
.calculation-box {
    background: #FFF;
    border: 4px solid #000;
    padding: 20px;
    margin: 20px auto;
    max-width: 800px;
    box-shadow: 
        6px 6px 0px #FF6B00,
        12px 12px 0px rgba(0,0,0,0.3);
    transform: rotate(-1deg);
}

.calc-line {
    font-size: 0.9rem;
    color: #000;
    text-shadow: 1px 1px 0px #FF6B00;
    margin: 10px 0;
    line-height: 1.8;
    text-align: center;
}

.meme-text {
    font-size: 1.5rem;
    color: #FF0000;
    text-shadow: 
        3px 3px 0px #000,
        6px 6px 0px rgba(255,255,255,0.5);
    animation: pulse 1.5s infinite;
    display: inline-block;
    padding: 10px 20px;
    border: 4px solid #000;
    background: #FFF;
    transform: rotate(-2deg);
    margin-bottom: 20px;
}

/* Logo 样式 */
.logo-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    width: 120px;
    height: 120px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    border: 6px solid #000;
    box-shadow: 
        6px 6px 0px #FF6B00,
        12px 12px 0px rgba(0,0,0,0.3);
    background: #FFF;
    padding: 10px;
    animation: logoSpin 4s ease-in-out infinite;
    transform: rotate(-5deg);
}

/* CA 地址显示区域 */
.ca-container {
    margin-top: 30px;
    padding: 20px;
    background: #FFF;
    border: 6px solid #000;
    box-shadow: 
        8px 8px 0px #FF6B00,
        16px 16px 0px rgba(0,0,0,0.3);
    display: inline-block;
    max-width: 95%;
    width: 100%;
    box-sizing: border-box;
    animation: float 3s ease-in-out infinite;
}

.ca-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    text-shadow: 1px 1px 0px #FF6B00;
}

.ca-address {
    font-size: 0.75rem;
    color: #000;
    background: #FFEB3B;
    padding: 12px 15px;
    border: 3px solid #000;
    margin: 10px 0;
    word-break: break-all;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-shadow: 1px 1px 0px #FF6B00;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 0.5px;
    line-height: 1.8;
    max-width: 100%;
    box-sizing: border-box;
    hyphens: auto;
}

.ca-copy-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    background: #FF6B00;
    color: #FFF;
    border: 4px solid #000;
    padding: 10px 20px;
    cursor: pointer;
    text-shadow: 2px 2px 0px #000;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.3);
    transition: all 0.1s;
    margin-top: 10px;
    transform: rotate(1deg);
}

.ca-copy-btn:hover {
    transform: rotate(-1deg) translateY(-2px);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.3);
}

.ca-copy-btn:active {
    transform: rotate(0deg) translateY(0);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.3);
}

/* 内容区域 */
.content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* 卡片样式 */
.card {
    background: #FFF;
    border: 6px solid #000;
    padding: 25px;
    position: relative;
    box-shadow: 
        8px 8px 0px #FF6B00,
        16px 16px 0px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: float 3s ease-in-out infinite;
}

.card:nth-child(odd) {
    animation-delay: 0s;
}

.card:nth-child(even) {
    animation-delay: 1.5s;
}

.card:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 
        12px 12px 0px #FF6B00,
        20px 20px 0px rgba(0,0,0,0.3);
}

.card-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 15px;
    filter: drop-shadow(2px 2px 0px #000);
}

.card-content {
    text-align: center;
}

.highlight {
    font-size: 1.3rem;
    color: #FF0000;
    text-shadow: 
        2px 2px 0px #000,
        4px 4px 0px rgba(255,255,255,0.5);
    margin-bottom: 10px;
    background: #FFEB3B;
    padding: 8px 12px;
    border: 3px solid #000;
    display: inline-block;
    transform: rotate(-1deg);
}

.equals {
    font-size: 1.5rem;
    color: #000;
    margin: 10px 0;
    text-shadow: 2px 2px 0px #FF6B00;
}

.result {
    font-size: 1rem;
    color: #000;
    margin: 15px 0;
    line-height: 1.6;
    text-shadow: 1px 1px 0px #FF6B00;
    background: #FFF9C4;
    padding: 10px;
    border: 2px dashed #000;
}

.note {
    font-size: 0.7rem;
    color: #666;
    margin-top: 10px;
    line-height: 1.5;
    font-style: italic;
}

/* Meme装饰气泡 */
.meme-elements {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 100;
}

.meme-bubble {
    position: absolute;
    background: #FFF;
    border: 4px solid #000;
    padding: 15px 20px;
    font-size: 0.9rem;
    color: #000;
    text-shadow: 1px 1px 0px #FF6B00;
    box-shadow: 4px 4px 0px #FF6B00;
    animation: wiggle 4s ease-in-out infinite;
    transform: rotate(-5deg);
}

.meme-bubble::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #000;
    bottom: -15px;
    left: 20px;
}

.meme-bubble::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #FFF;
    bottom: -12px;
    left: 22px;
}

.meme-bubble-1 {
    top: 10%;
    right: 5%;
    animation-delay: 0s;
}

.meme-bubble-2 {
    top: 30%;
    left: 5%;
    animation-delay: 1s;
    transform: rotate(5deg);
}

.meme-bubble-3 {
    bottom: 30%;
    right: 10%;
    animation-delay: 2s;
    transform: rotate(-3deg);
}

.meme-bubble-4 {
    bottom: 15%;
    left: 8%;
    animation-delay: 3s;
    transform: rotate(4deg);
}

/* 底部 */
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

.footer-text {
    font-size: 0.8rem;
    color: #000;
    text-shadow: 2px 2px 0px #FF6B00;
    margin: 10px 0;
    line-height: 1.8;
}

/* 动画效果 */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: rotate(-2deg) scale(1);
    }
    50% {
        transform: rotate(-2deg) scale(1.05);
    }
}

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

@keyframes wiggle {
    0%, 100% {
        transform: rotate(-5deg) translateY(0);
    }
    25% {
        transform: rotate(-3deg) translateY(-5px);
    }
    50% {
        transform: rotate(-7deg) translateY(0);
    }
    75% {
        transform: rotate(-3deg) translateY(5px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .meme-text {
        font-size: 1.2rem;
    }
    
    .content {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 20px;
    }
    
    .highlight {
        font-size: 1rem;
    }
    
    .result {
        font-size: 0.85rem;
    }
    
    .meme-bubble {
        font-size: 0.7rem;
        padding: 10px 15px;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .ca-container {
        padding: 15px;
    }
    
    .ca-address {
        font-size: 0.7rem;
        padding: 10px 12px;
    }
    
    .ca-copy-btn {
        font-size: 0.6rem;
        padding: 8px 15px;
    }
    
    .calculation-box {
        padding: 15px;
        max-width: 95%;
    }
    
    .calc-line {
        font-size: 0.7rem;
        line-height: 1.6;
    }
    
    .ca-container {
        max-width: 98%;
        padding: 15px;
    }
    
    .ca-address {
        font-size: 0.6rem;
        padding: 10px 12px;
        letter-spacing: 0.3px;
    }
    
    .update-notice {
        top: 10px;
        right: 10px;
        max-width: 200px;
    }
    
    .notice-content {
        padding: 12px 15px;
        max-width: 100%;
    }
    
    .notice-title {
        font-size: 0.6rem;
    }
    
    .notice-text {
        font-size: 0.5rem;
    }
}

/* 像素风格装饰 */
.card::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,0,0,0.1) 10px,
        rgba(0,0,0,0.1) 20px
    );
    z-index: -1;
    opacity: 0.3;
}

/* 额外的meme装饰 */
.header::before {
    content: '💎';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 2rem;
    animation: spin 3s linear infinite;
}

.header::after {
    content: '🚀';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2rem;
    animation: fly 2s ease-in-out infinite;
}

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

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

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