/* 外企职场英语学习网页样式 */
/* 现代简约商务风 - 深蓝色主调 + 浅灰背景 */

:root {
    --primary-color: #0056b3;
    --primary-dark: #003d82;
    --primary-light: #4d94ff;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --border-color: #e1e5eb;
    --shadow: 0 4px 20px rgba(0, 86, 179, 0.15);
    --shadow-hover: 0 8px 30px rgba(0, 86, 179, 0.25);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 1.8rem;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid transparent;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.nav-btn.active {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
}

/* 进度指示器 */
.progress-indicator {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* 学习卡片区 */
.card-container {
    perspective: 1000px;
    width: 100%;
    max-width: 600px;
}

.card {
    position: relative;
    width: 100%;
    height: 350px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.card-face:hover {
    box-shadow: var(--shadow-hover);
}

.card-front {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
}

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.card-content {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-back .card-content {
    color: white;
    font-size: 1.5rem;
}

.card-pronunciation {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.card-back .card-pronunciation {
    color: rgba(255, 255, 255, 0.8);
}

.card-definition {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-back .card-definition {
    color: rgba(255, 255, 255, 0.95);
}

.card-example {
    font-size: 0.95rem;
    color: var(--text-secondary);
    background: rgba(0, 86, 179, 0.08);
    padding: 1rem;
    border-radius: 10px;
    line-height: 1.5;
    border-left: 4px solid var(--primary-color);
}

.card-back .card-example {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    border-left-color: rgba(255, 255, 255, 0.5);
}

/* 例句中文翻译样式 */
.card-example-cn {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
    font-style: italic;
    line-height: 1.4;
}

/* 卡片背面中文释义样式 */
.card-definition-back {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffeb3b;
    margin-bottom: 1rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* 收藏按钮样式 */
.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
    color: #ccc;
    z-index: 10;
    padding: 0.3rem;
    line-height: 1;
}

.favorite-btn:hover {
    transform: scale(1.2);
}

.favorite-btn.favorited {
    color: #ffc107;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.favorite-btn-back {
    color: rgba(255, 255, 255, 0.5);
}

.favorite-btn-back.favorited {
    color: #ffc107;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

/* 空状态提示 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.empty-state-hint {
    font-size: 0.9rem;
    opacity: 0.7;
}

.flip-hint {
    position: absolute;
    bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.card-back .flip-hint {
    color: rgba(255, 255, 255, 0.6);
}

/* 控制按钮区 */
.controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-nav {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-nav:hover {
    background: var(--primary-color);
    color: white;
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-speak {
    background: linear-gradient(135deg, #28a745, #20863b);
    color: white;
}

.btn-speak:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-detail {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-detail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.4);
}

/* 页脚样式 */
.footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

.footer p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.footer .stats {
    opacity: 0.8;
    font-size: 0.85rem;
}

/* 响应式设计 - 平板 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .card {
        height: 320px;
    }

    .card-content {
        font-size: 1.6rem;
    }

    .card-back .card-content {
        font-size: 1.3rem;
    }

    .card-definition-back {
        font-size: 1.1rem;
        padding: 0.6rem 1rem;
    }

    .control-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 480px) {
    .navbar {
        padding: 0.8rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo-icon {
        font-size: 1.4rem;
    }

    .nav-tabs {
        width: 100%;
        justify-content: center;
    }

    .nav-btn {
        flex: 1;
        text-align: center;
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .main-content {
        padding: 1rem 0.8rem;
        gap: 1.5rem;
    }

    .card-container {
        max-width: 100%;
    }

    .card {
        height: 380px;
    }

    .card-face {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .card-content {
        font-size: 1.4rem;
    }

    .card-back .card-content {
        font-size: 1.2rem;
    }

    .card-definition-back {
        font-size: 1rem;
        padding: 0.5rem 0.8rem;
    }

    .card-pronunciation {
        font-size: 1rem;
    }

    .card-definition {
        font-size: 1rem;
    }

    .card-example {
        font-size: 0.9rem;
        padding: 0.8rem;
    }

    .controls {
        width: 100%;
        gap: 0.8rem;
    }

    .control-btn {
        flex: 1;
        min-width: 45%;
        justify-content: center;
        padding: 1rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .btn-speak,
    .btn-detail {
        min-width: 100%;
    }

    .footer {
        padding: 1.2rem 0.8rem;
    }

    .footer p {
        font-size: 0.8rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-container {
    animation: fadeIn 0.5s ease;
}

/* 按钮点击效果 */
.control-btn:active {
    transform: scale(0.95);
}

.btn-speak:active,
.btn-detail:active {
    transform: scale(0.98);
}
