/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #1a73e8;
    text-decoration: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.user-points {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-actions a {
    color: #5f6368;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.user-actions a:hover {
    background-color: #f1f3f4;
}

.recharge-link {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #fef0e6;
    color: #e65100;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.recharge-link:hover {
    background: #ffe0b2;
    transform: translateY(-1px);
}

.recharge-link .icon {
    font-size: 16px;
}

/* 当积分不足时的样式 */
.user-points.low {
    animation: pulse 2s infinite;
    background: #fbe9e7;
    color: #c62828;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 主容器样式 */
.container {
    max-width: 1000px;
    margin: 80px auto 20px;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 表单样式优化 */
.generate-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.form-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-body {
    padding: 20px;
}

.form-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

/* 积分信息样式 */
.points-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.points-required {
    color: #1a73e8;
    font-weight: 500;
}

.points-required strong {
    font-size: 16px;
    color: #1557b0;
}

.points-balance {
    padding-left: 20px;
    border-left: 1px solid #ddd;
}

.points-balance.sufficient {
    color: #2e7d32;
}

.points-balance.insufficient {
    color: #c62828;
}

.points-balance strong {
    font-size: 16px;
}

/* 生成按钮样式 */
.btn-generate {
    background: linear-gradient(45deg, #1a73e8, #1557b0);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-generate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,115,232,0.3);
}

.btn-generate:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 18px;
}

/* 积分不足时的按钮样式 */
.points-insufficient .btn-generate {
    background: linear-gradient(45deg, #9e9e9e, #757575);
    cursor: not-allowed;
}

.points-insufficient .btn-generate:hover {
    transform: none;
    box-shadow: none;
}

/* 表单输入框样式 */
select, input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s;
}

select:focus, 
input[type="number"]:focus, 
textarea:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.1);
    outline: none;
}

/* 结果容器样式 */
.result-container {
    margin-top: 30px;
    padding: 25px;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    background: #f8f9fa;
}

.result-content {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.8;
    white-space: pre-wrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.result-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.result-actions button {
    background: #fff;
    color: #1a73e8;
    border: 1px solid #1a73e8;
    padding: 8px 16px;
}

.result-actions button:hover {
    background: #e8f0fe;
    box-shadow: none;
}

/* 加载动画样式 */
.loading-indicator {
    text-align: center;
    padding: 30px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    border: 3px solid #e8f0fe;
    border-top: 3px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #5f6368;
    font-size: 14px;
}

/* 认证页面样式 */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo img {
    height: 48px;
    width: auto;
}

.auth-box h1 {
    text-align: center;
    color: #1a1a1a;
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 32px;
}

.auth-form {
    display: grid;
    gap: 20px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.auth-form input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.auth-form input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.1);
    outline: none;
}

.auth-form .btn-submit {
    background: linear-gradient(45deg, #1a73e8, #1557b0);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.auth-form .btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,115,232,0.3);
}

.auth-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.auth-links p {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.auth-links a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: #1557b0;
}

.back-home {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
    color: #666 !important;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 

/* 在现有样式后添加 */
.result-content.broadcast {
    font-size: 18px;
    line-height: 2;
    letter-spacing: 1px;
    padding: 25px;
    background: #fff8e1;
    border-left: 4px solid #ffa000;
}

.result-content.broadcast mark {
    background: #ffe0b2;
    padding: 0 4px;
    border-radius: 2px;
}

/* 添加朗读指引样式 */
.broadcast-tips {
    margin-top: 15px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 8px;
    font-size: 14px;
    color: #1565c0;
}

.broadcast-tips ul {
    list-style: none;
    margin: 8px 0;
}

.broadcast-tips li {
    margin: 4px 0;
    padding-left: 20px;
    position: relative;
}

.broadcast-tips li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #1976d2;
} 

/* 添加未登录提示样式 */
.login-required {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.login-message {
    max-width: 400px;
    margin: 0 auto;
}

.login-message h2 {
    color: #1a73e8;
    margin-bottom: 15px;
}

.login-message p {
    color: #5f6368;
    margin-bottom: 25px;
}

.login-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.button {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.button.primary {
    background: #1a73e8;
    color: white;
}

.button.secondary {
    background: white;
    color: #1a73e8;
    border: 1px solid #1a73e8;
}

.button:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
} 

.points-tip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fbe9e7;
    color: #c62828;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-top: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.points-tip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #fbe9e7;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
} 

/* 积分提示样式 */
.points-tip {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

.user-points-status {
    margin-left: 8px;
}

.points-low {
    color: #e53935;
}

.btn-generate {
    position: relative;
    padding-right: 100px;
}

.points-cost {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.8;
    background: rgba(0,0,0,0.1);
    padding: 4px 8px;
    border-radius: 12px;
}

/* 积分不足时的按钮样式 */
.points-insufficient .btn-generate {
    background: #ccc;
    cursor: not-allowed;
}

.points-insufficient .points-cost {
    background: rgba(0,0,0,0.2);
} 

/* 手机验证码样式 */
.phone-verify {
    display: flex;
    gap: 10px;
}

.phone-verify input {
    flex: 1;
}

.btn-send-code {
    white-space: nowrap;
    padding: 0 15px;
    background: #f0f2f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #1a73e8;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-send-code:hover {
    background: #e8eaed;
}

.btn-send-code:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
} 

/* 响应式设计 */
@media screen and (max-width: 768px) {
    /* 导航栏响应式 */
    .nav-container {
        padding: 0 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .user-actions {
        width: 100%;
        justify-content: center;
    }
    
    /* 主容器响应式 */
    .container {
        margin: 60px 10px 20px;
        padding: 15px;
    }
    
    /* 表单响应式 */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    /* 按钮响应式 */
    .btn-generate {
        width: 100%;
        padding: 12px 15px;
    }
    
    .points-cost {
        position: static;
        display: block;
        text-align: center;
        margin-top: 8px;
        transform: none;
    }
    
    /* 结果容器响应式 */
    .result-container {
        padding: 15px;
    }
    
    .result-content {
        padding: 15px;
        font-size: 14px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions button {
        width: 100%;
    }
    
    /* 认证页面响应式 */
    .auth-box {
        padding: 20px;
    }
    
    .auth-form input {
        padding: 10px;
    }
    
    /* 积分信息响应式 */
    .points-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .points-balance {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #ddd;
        padding-top: 10px;
        width: 100%;
    }
}

/* 小屏幕手机响应式 */
@media screen and (max-width: 480px) {
    .logo {
        font-size: 20px;
    }
    
    .container {
        margin: 50px 5px 10px;
        padding: 10px;
    }
    
    textarea {
        min-height: 120px;
    }
    
    .auth-box h1 {
        font-size: 20px;
    }
    
    .auth-subtitle {
        font-size: 13px;
    }
    
    .result-content {
        font-size: 13px;
    }
}

/* 确保表单元素在移动端更易于点击 */
@media (hover: none) and (pointer: coarse) {
    select,
    input[type="number"],
    textarea,
    button {
        font-size: 16px !important;
        padding: 12px !important;
    }
    
    .form-group label {
        font-size: 15px;
    }
} 