/* 二次元海岛奇兵工具页面样式 */

:root {
    /* 二次元海岛色彩 */
    --island-blue: #4fc3f7;
    --ocean-teal: #26c6da;
    --sunset-orange: #ff9800;
    --coral-pink: #ff6b9d;
    --palm-green: #66bb6a;
    --sand-yellow: #ffeb3b;
    --sky-purple: #9c27b0;
    --wave-cyan: #00bcd4;
    
    /* 可爱装饰色 */
    --kawaii-pink: #ffb3d9;
    --kawaii-blue: #b3d9ff;
    --kawaii-purple: #d9b3ff;
    --kawaii-mint: #b3ffcc;
    
    /* 背景渐变 */
    --tool-gradient: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 50%, #fff3e0 100%);
    --card-gradient: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    --button-gradient: linear-gradient(135deg, #4fc3f7 0%, #26c6da 100%);
    
    /* 阴影效果 */
    --kawaii-shadow: 0 8px 32px rgba(255, 107, 157, 0.2);
    --tool-shadow: 0 4px 16px rgba(79, 195, 247, 0.2);
    --hover-shadow: 0 12px 40px rgba(79, 195, 247, 0.3);
}

/* 覆盖原有样式，添加二次元风格 */
body {
    font-family: 'Comic Sans MS', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', sans-serif !important;
    background: var(--tool-gradient) !important;
    background-attachment: fixed !important;
}

/* 可爱的页面装饰 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(79, 195, 247, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 157, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 152, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: gentleFloat 8s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-5px) scale(1.01); }
}

/* 增强现有容器 */
.container {
    position: relative;
    z-index: 1;
}

/* 增强头部样式 */
.header {
    background: var(--card-gradient) !important;
    border: 3px solid var(--island-blue) !important;
    box-shadow: var(--tool-shadow) !important;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '🏝️ ⚔️ 🌊 ⚓ 🐚 🌺 🦀 🐠';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: sparkleMove 10s linear infinite;
    color: var(--island-blue);
}

@keyframes sparkleMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.header h1 {
    background: var(--button-gradient) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    position: relative;
}

.header h1::after {
    content: '✨';
    position: absolute;
    right: -40px;
    top: -5px;
    font-size: 2rem;
    animation: twinkle 2s infinite;
    -webkit-text-fill-color: initial;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* 增强卡片样式 */
.card, .calculator-section, .result-section {
    background: var(--card-gradient) !important;
    border: 3px solid #e3f2fd !important;
    border-radius: 25px !important;
    box-shadow: var(--tool-shadow) !important;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    position: relative;
    overflow: hidden;
}

.card::before, .calculator-section::before, .result-section::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: var(--button-gradient);
    border-radius: 25px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::before, .calculator-section:hover::before, .result-section:hover::before {
    opacity: 1;
}

.card:hover, .calculator-section:hover, .result-section:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--hover-shadow) !important;
    border-color: transparent !important;
}

/* 增强按钮样式 */
button, .btn, input[type="button"], input[type="submit"] {
    background: var(--button-gradient) !important;
    color: white !important;
    border: 3px solid white !important;
    border-radius: 25px !important;
    padding: 12px 25px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    box-shadow: var(--tool-shadow) !important;
    position: relative;
    overflow: hidden;
}

button::before, .btn::before, input[type="button"]::before, input[type="submit"]::before {
    content: '✨';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    transition: left 0.3s;
}

button:hover::before, .btn:hover::before, input[type="button"]:hover::before, input[type="submit"]:hover::before {
    left: calc(100% + 10px);
}

button:hover, .btn:hover, input[type="button"]:hover, input[type="submit"]:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: var(--hover-shadow) !important;
}

/* 增强输入框样式 */
input[type="text"], input[type="number"], select, textarea {
    border: 3px solid #e3f2fd !important;
    border-radius: 15px !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    background: white !important;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: var(--island-blue) !important;
    box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.2) !important;
    transform: scale(1.02) !important;
}

/* 增强表格样式 */
table {
    background: white !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    box-shadow: var(--tool-shadow) !important;
    border: 3px solid #f0f8ff !important;
}

th {
    background: var(--button-gradient) !important;
    color: white !important;
    font-weight: 600 !important;
}

tr:hover {
    background: #f8f9ff !important;
}

/* 结果显示区域 */
.result-area, .damage-result {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff3e0 100%) !important;
    border: 3px solid var(--kawaii-blue) !important;
    border-radius: 20px !important;
    padding: 25px !important;
    position: relative;
}

.result-area::after, .damage-result::after {
    content: '🎯';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem !important;
    }
    
    .card, .calculator-section, .result-section {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }
    
    button, .btn, input[type="button"], input[type="submit"] {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
    }
    
    table {
        font-size: 0.9rem !important;
    }
    
    th, td {
        padding: 10px 8px !important;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem !important;
    }
    
    .card, .calculator-section, .result-section {
        padding: 15px !important;
        border-radius: 20px !important;
    }
    
    input[type="text"], input[type="number"], select, textarea {
        padding: 10px 12px !important;
    }
    
    button, .btn, input[type="button"], input[type="submit"] {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
    }
}

/* 返回按钮 */
.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--kawaii-pink) !important;
    color: white !important;
    border: 3px solid white !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    box-shadow: var(--kawaii-shadow) !important;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.back-btn:hover {
    transform: translateY(-3px) scale(1.1) !important;
    box-shadow: var(--hover-shadow) !important;
}

/* 浮动装饰 */
.floating-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.decoration {
    position: absolute;
    font-size: 1.2rem;
    animation: floatDecoration 8s ease-in-out infinite;
    opacity: 0.4;
}

@keyframes floatDecoration {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}