/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: #f8fafc;
    color: #334155;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 16px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-logo i {
    color: #3b82f6;
    font-size: 24px;
}

.navbar-logo h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.back-btn {
    padding: 8px 16px;
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.back-btn:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

.back-btn.hidden {
    display: none;
}

/* 页面通用样式 */
.page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page.active {
    display: block;
    opacity: 1;
}

/* 应用列表页面样式 */
.page-header {
    text-align: center;
    margin: 40px 0;
}

.page-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.page-header p {
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.app-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.card-img img,
.card-img iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-img iframe {
    border: none;
    position: absolute;
    top: 0;
    left: 0;
}

.app-card:hover .card-img img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.card-desc {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* 应用详情页面样式 */
.detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 40px 0 60px;
}

.detail-img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
}

.detail-img img,
.detail-img iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-img iframe {
    border: none;
}

.detail-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.detail-tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    width: fit-content;
}

.detail-desc-short {
    color: #64748b;
    font-size: 16px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
}

.detail-desc-full {
    color: #475569;
    font-size: 15px;
    line-height: 1.8;
}

.detail-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #3b82f6;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-primary:disabled {
    background-color: #93c5fd;
    cursor: not-allowed;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #f1f5f9;
    color: #334155;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

/* 卡密查询页面样式 */
.check-container {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 600px;
    margin: 40px auto;
}

.check-header {
    text-align: center;
    margin-bottom: 32px;
}

.check-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.check-header p {
    color: #64748b;
    font-size: 16px;
}

.check-form {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.check-result {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border-left: 4px solid #3b82f6;
}

.check-result.hidden {
    display: none;
}

.result-header {
    margin-bottom: 20px;
}

.result-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.result-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 16px;
    color: #334155;
    font-weight: 500;
}

.status-active {
    color: #10b981;
    font-weight: 600;
}

.status-expired {
    color: #ef4444;
    font-weight: 600;
}

.status-inactive {
    color: #f59e0b;
    font-weight: 600;
}

.check-error {
    background-color: #fee2e2;
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid #ef4444;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 12px;
}

.check-error.hidden {
    display: none;
}

.check-error i {
    font-size: 20px;
}

/* 页脚样式 */
.footer {
    background-color: #ffffff;
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.footer p {
    color: #64748b;
    font-size: 14px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .app-grid {
        grid-template-columns: 1fr;
    }

    .detail-container {
        grid-template-columns: 1fr;
    }

    .detail-img {
        min-height: 250px;
    }

    .detail-content {
        padding: 24px;
    }

    .detail-title {
        font-size: 24px;
    }

    .navbar .container {
        flex-direction: column;
        gap: 16px;
    }

    .navbar-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .check-container {
        padding: 24px;
        margin: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .result-content {
        grid-template-columns: 1fr;
    }
}