/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* 容器样式 */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.5s ease-in-out;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主内容样式 */
main {
    padding: 30px;
}

/* 句子容器样式 */
.quote-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    border-left: 5px solid #4facfe;
    transition: all 0.3s ease;
}

.quote-container:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.quote-content {
    font-size: 1.5rem;
    line-height: 1.8;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 15px;
    word-wrap: break-word;
}

.quote-status {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    font-size: 1rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* API信息样式 */
.api-info {
    background: #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.api-info h3 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 1.2rem;
}

.api-info p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.api-info span {
    font-family: 'Courier New', Courier, monospace;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.hidden-text {
    background: #333;
    color: #333;
    transition: all 0.3s ease;
}

.hidden-text.visible {
    background: white;
    color: #333;
}

.btn-toggle {
    background: #fff;
    border: 1px solid #ddd;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 8px;
}

.btn-toggle:hover {
    background: #f8f9fa;
}

/* 页脚样式 */
footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    border-top: 1px solid #dee2e6;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4facfe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 30px 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .quote-container {
        padding: 30px 20px;
    }
    
    .quote-content {
        font-size: 1.3rem;
    }
    
    .button-group {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .quote-content {
        font-size: 1.2rem;
    }
    
    .api-info {
        padding: 15px;
    }
    
    .api-info p {
        font-size: 0.9rem;
    }
}