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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2e7d32;
    overflow-x: hidden;
}

/* 容器布局 */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    z-index: 10;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: #2e7d32;
    text-shadow: 
        0 0 10px rgba(129, 199, 132, 0.8),
        0 0 20px rgba(129, 199, 132, 0.6),
        0 0 30px rgba(129, 199, 132, 0.4);
    margin-bottom: 10px;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.subtitle {
    font-size: 1.2rem;
    color: #388e3c;
    opacity: 0.9;
    text-shadow: 0 0 5px rgba(102, 187, 106, 0.5);
}

/* 主内容区域 */
.main-content {
    width: 100%;
    max-width: 800px;
    z-index: 10;
}

/* 一言容器 */
.quote-container {
    background: linear-gradient(135deg, rgba(129, 199, 132, 0.1), rgba(165, 214, 167, 0.05));
    border: 2px solid rgba(102, 187, 106, 0.3);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(102, 187, 106, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.quote-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #81c784, #a5d6a7, #81c784, #a5d6a7);
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 4s linear infinite;
}

/* 加载状态 */
.loading {
    display: none;
    text-align: center;
    color: #2e7d32;
}

.loading.show {
    display: block;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 187, 106, 0.3);
    border-top: 4px solid #2e7d32;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

/* 一言显示 */
.quote-display {
    display: block;
    text-align: center;
}

.quote-display.hide {
    display: none;
}

.quote-text {
    font-size: 1.8rem;
    line-height: 1.8;
    color: #2e7d32;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(102, 187, 106, 0.1);
    font-weight: 500;
}

.quote-index {
    font-size: 0.9rem;
    color: #388e3c;
    opacity: 0.8;
}

/* 错误信息 */
.error-message {
    display: none;
    text-align: center;
    color: #66bb6a;
}

.error-message.show {
    display: block;
}

.error-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.error-text {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* 控制按钮 */
.controls {
    text-align: center;
}

.refresh-btn {
    background: linear-gradient(135deg, #81c784, #a5d6a7);
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2e7d32;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(102, 187, 106, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(102, 187, 106, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

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

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.refresh-btn:hover .btn-icon {
    transform: rotate(180deg);
}

/* 底部 */
.footer {
    margin-top: 40px;
    text-align: center;
    color: #388e3c;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* 动画效果 */
@keyframes titleGlow {
    0% {
        text-shadow: 
            0 0 10px rgba(129, 199, 132, 0.8),
            0 0 20px rgba(129, 199, 132, 0.6),
            0 0 30px rgba(129, 199, 132, 0.4);
    }
    100% {
        text-shadow: 
            0 0 15px rgba(129, 199, 132, 1),
            0 0 25px rgba(129, 199, 132, 0.8),
            0 0 35px rgba(129, 199, 132, 0.6);
    }
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* 平板端适配 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 30px;
    }
    
    .title {
        font-size: 3.5rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
    
    .quote-container {
        padding: 50px;
    }
    
    .quote-text {
        font-size: 2rem;
    }
}

/* 电脑端适配 (1024px+) */
@media (min-width: 1024px) {
    .container {
        padding: 40px;
    }
    
    .title {
        font-size: 4rem;
    }
    
    .subtitle {
        font-size: 1.4rem;
    }
    
    .quote-container {
        padding: 60px;
        max-width: 900px;
    }
    
    .quote-text {
        font-size: 2.2rem;
        line-height: 1.9;
    }
    
    .refresh-btn {
        padding: 18px 36px;
        font-size: 1.2rem;
    }
}

/* 手机端适配 (小于768px) */
@media (max-width: 767px) {
    .container {
        padding: 15px;
    }
    
    .header {
        margin-bottom: 30px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .quote-container {
        padding: 25px;
        border-radius: 15px;
    }
    
    .quote-text {
        font-size: 1.4rem;
        line-height: 1.6;
    }
    
    .refresh-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .footer {
        margin-top: 30px;
        font-size: 0.8rem;
    }
}

/* 超小屏幕适配 (小于480px) */
@media (max-width: 479px) {
    .title {
        font-size: 2rem;
    }
    
    .quote-container {
        padding: 20px;
    }
    
    .quote-text {
        font-size: 1.2rem;
    }
    
    .refresh-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}