* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

:root {
    --primary-color: #7c88ff;
    --primary-light: #eaedff;
    --secondary-color: #ffb6c1;
    --bg-color: #f8f9ff;
    --text-color: #4a4a6a;
    --card-bg: #ffffff;
    --shadow: 0 8px 20px rgba(124, 136, 255, 0.08);
    --border-radius: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(124, 136, 255, 0.05) 2%, transparent 0%), 
        radial-gradient(circle at 75px 75px, rgba(255, 182, 193, 0.05) 2%, transparent 0%);
    background-size: 100px 100px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 28px 20px;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
    position: relative;
}

.header-icons {
    position: absolute;
    right: 0;
    display: flex;
    gap: 12px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.description {
    font-size: 0.95rem;
    color: #8a8aa9;
    margin-bottom: 28px;
    text-align: center;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.input-area {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(124, 136, 255, 0.1);
    transition: all 0.3s ease;
}

.input-area:focus-within {
    box-shadow: 0 10px 25px rgba(124, 136, 255, 0.12);
    transform: translateY(-2px);
}

textarea {
    width: 100%;
    height: 120px;
    border: none;
    outline: none;
    resize: none;
    font-size: 1.05rem;
    background: transparent;
    color: var(--text-color);
}

textarea::placeholder {
    color: #b4b4c7;
}

.primary-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(124, 136, 255, 0.2);
    position: relative;
    overflow: visible;
}

.primary-btn:hover {
    background-color: #6a77fa;
    box-shadow: 0 6px 16px rgba(124, 136, 255, 0.25);
    transform: translateY(-2px);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.primary-btn::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: var(--border-radius);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.primary-btn:hover::after {
    opacity: 0.4;
    animation: breathe 2s infinite ease-in-out;
}

@keyframes breathe {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.4;
        transform: scale(1);
    }
}

.features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(124, 136, 255, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.feature-card:hover {
    box-shadow: 0 10px 25px rgba(124, 136, 255, 0.12);
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 14px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-card h3::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.feature-description {
    font-size: 0.85rem;
    color: #8a8aa9;
    margin-bottom: 14px;
}

.feature-content {
    min-height: 60px;
    padding: 16px;
    background-color: var(--primary-light);
    border-radius: 12px;
    line-height: 1.6;
    border: 1px dashed rgba(124, 136, 255, 0.2);
}

#translation-content p {
    margin-bottom: 0;
    color: var(--text-color);
}

#words-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.word-item {
    background-color: #f0f2ff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(124, 136, 255, 0.1);
    font-weight: 500;
}

.word-item:hover {
    background-color: #e5e9ff;
    transform: translateY(-2px);
}

.word-item.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(124, 136, 255, 0.2);
}

.sentence-item {
    padding: 14px;
    border-bottom: 1px solid rgba(124, 136, 255, 0.1);
    transition: background-color 0.2s ease;
}

.sentence-item:hover {
    background-color: #f5f7ff;
}

.sentence-item:last-child {
    border-bottom: none;
}

.loading {
    text-align: center;
    padding: 24px;
    color: #8a8aa9;
    font-style: italic;
}

.error {
    color: #e74c3c;
    text-align: center;
    padding: 16px;
}

@media (max-width: 600px) {
    .container {
        padding: 16px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .feature-card {
        padding: 18px;
    }
}

/* 装饰元素 */
footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px 0;
}

.decoration {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.decoration-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.6;
    animation: pulse 3s infinite ease-in-out;
    animation-delay: var(--delay, 0s);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
        background-color: var(--primary-color);
    }
    50% {
        transform: scale(1.5);
        opacity: 0.9;
        background-color: var(--secondary-color);
    }
}

/* 图标样式 */
.fas {
    margin-right: 5px;
}

h1 .fas {
    color: var(--secondary-color);
    margin-right: 10px;
}

/* 额外的动画和过渡效果 */
.feature-card:nth-child(1) {
    border-left: 3px solid var(--primary-color);
}

.feature-card:nth-child(2) {
    border-left: 3px solid #8e9aff;
}

.feature-card:nth-child(3) {
    border-left: 3px solid var(--secondary-color);
}

/* 响应式优化 */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f7ff;
}

::-webkit-scrollbar-thumb {
    background: #d1d5ff;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 输入框焦点状态 */
.input-area.focused {
    box-shadow: 0 10px 25px rgba(124, 136, 255, 0.2);
    border-color: var(--primary-color);
}

/* 文字选择样式 */
::selection {
    background-color: var(--primary-light);
    color: var(--primary-color);
} 