/*
* 红嘴鸥教育卡密兑换系统前台样式
* 整合自原style.css
*/

/* 通用基础样式 */
:root {
    --primary: #6c5ce7;
    --secondary: #a8a5e6;
    --success: #00b894;
    --danger: #ff7675;
    --exchange-btn-color: #ff4757;
    --record-btn-color: #00b894;
    --query-btn-color: #6c5ce7;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f6f7fb 0%, #eef1f5 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
}

/* 前端容器样式 */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.hero-section {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 20px;
}

.hero-section h1 i {
    color: var(--primary);
    margin-right: 10px;
}

/* 卡密输入框和按钮样式 */
.card-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.card-box input {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s;
}

.card-box input:focus {
    border-color: var(--primary);
}

.glow-btn {
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.glow-btn.exchange {
    background: var(--exchange-btn-color);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

.glow-btn.exchange:hover {
    background-color: #ff1f33;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.7);
}

.glow-btn.record {
    background: var(--record-btn-color);
    box-shadow: 0 0 10px rgba(0, 184, 148, 0.5);
}

.glow-btn.record:hover {
    background-color: #009679;
    box-shadow: 0 0 20px rgba(0, 184, 148, 0.7);
}

.glow-btn.query {
    background: var(--query-btn-color);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
}

.glow-btn.query:hover {
    background-color: #584bc4;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.7);
}

/* 结果显示区域样式 */
#result {
    margin-top: 20px;
}

.message {
    padding: 15px;
    border-radius: 10px;
    font-size: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap !important;
}

.message > * {
    flex-basis: auto;
    max-width: 100%;
    text-align: center;
}

.message.success {
    background-color: #e8f5e9;
    color: var(--success);
    white-space: pre-wrap !important;
    word-break: break-word;
    line-height: 1.5;
    text-indent: 0;
}

.message.success i {
    margin-bottom: 8px;
    align-self: center;
}

.message.error {
    background-color: #ffebee;
    color: var(--danger);
    line-height: 1.5;
    white-space: pre-wrap !important;
    text-align: center;
    align-items: center;
}

.message i {
    margin-bottom: 8px;
    align-self: center;
}

/* 记录查询弹窗样式 */
.record-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.record-content {
    background: white;
    width: 90%;
    max-width: 500px;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.record-header h3 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.record-input {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.record-input input {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s;
}

.record-input input:focus {
    border-color: var(--primary);
}

.record-result {
    max-height: 400px;
    overflow-y: auto;
}

.record-item {
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 10px;
}

.record-item p {
    margin-bottom: 5px;
    white-space: pre-wrap !important;
    word-break: break-word;
    line-height: 1.5;
}

.loading {
    text-align: center;
    padding: 15px;
    color: #666;
}

.error {
    color: var(--danger);
    text-align: center;
    padding: 15px;
}

/* 响应式设计样式 */
@media screen and (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    
    .hero-section {
        padding: 25px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .card-box {
        flex-direction: column;
    }
    
    .card-box input {
        width: 100%;
        min-width: auto;
    }
    
    .glow-btn {
        width: 100%;
        padding: 12px 20px;
    }
    
    .record-input {
        flex-direction: column;
    }
    
    .record-input input {
        width: 100%;
        min-width: auto;
    }
    
    .record-modal {
        padding: 10px;
    }
    
    .record-content {
        width: 95%;
    }
    
    .prompt-red-text {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .main-container {
        padding: 0.5rem;
    }
    
    .hero-section {
        padding: 20px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .prompt-red-text {
        font-size: 12px;
    }
}

/* 按钮样式 */
.button-anys {
    background: linear-gradient(135deg, #6c5ce7, #a8a5e6);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
    box-shadow: 0 4px 6px rgba(108, 92, 231, 0.2);
    display: inline-block;
    text-decoration: none;
}

.button-anys:hover {
    background: linear-gradient(135deg, #584bc4, #8a87d6);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(108, 92, 231, 0.3);
}

/* 提示文字样式 */
.prompt-title {
    font-size: 16px;
    color: #333;
    margin: 15px 0 10px;
    font-weight: 600;
}

/* 红色提示文本样式 */
.prompt-red-text {
    color: #ff0000;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    font-size: 16px;
    margin: 15px 0 10px;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 资源按钮容器样式 */
.resource-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

/* 链接复制按钮样式 */
.copy-link-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
    line-height: 1.2;
}

.copy-link-btn:hover {
    background: #584bc4;
    transform: translateY(-1px);
}

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

/* 消息内容中的链接和按钮处理 */
.message span a,
.record-item p a {
    color: #1a73e8 !important;
    text-decoration: underline !important;
    word-break: break-all;
    display: inline;
}

/* 复制成功提示样式 */
.copy-tooltip {
    position: fixed;
    background-color: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

/* 移动设备中的响应式调整 */
@media screen and (max-width: 480px) {
    .resource-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .button-anys {
        width: 100%;
        max-width: 250px;
        margin: 5px 0;
    }
    
    .copy-link-btn {
        padding: 2px 5px;
        font-size: 10px;
        margin-left: 2px;
    }
} 