/* VR游戏解析浏览器 - 组件样式 */
/* components.css - 轮播图、搜索、文章、解析、卡密、模态框、分页 */

/* ========== 轮播图组件 ========== */
.carousel-section {
    margin-bottom: 40px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.carousel-track {
    display: flex;
    height: 100%;
    animation: slideCarousel 50s linear infinite;
    width: calc(290px * 30);
}

.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes slideCarousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.carousel-card {
    flex: 0 0 250px;
    height: 85%;
    margin: 10px 20px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    transform: scale(0.4);
    opacity: 0;
    filter: blur(8px);
}

.carousel-card:hover {
    z-index: 15 !important;
    transform: scale(1.3) !important;
    filter: blur(0px) !important;
    opacity: 1 !important;
}

.carousel-card-image {
    width: 100%;
    height: 60%;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    position: relative;
    overflow: hidden;
}

.carousel-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-card-content {
    padding: 15px;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carousel-card-title {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.carousel-card-date {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* ========== 搜索组件 ========== */
.search-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
}

.search-section h1 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 2.2em;
    font-weight: 300;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 12px;
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.search-loading {
    text-align: center;
    padding: 60px 20px;
}

.search-loading p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* ========== 搜索结果容器 ========== */
.results-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.results-container.hidden {
    display: none;
}

.results-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    font-size: 1.2em;
    font-weight: 500;
}

/* ========== 文章列表组件 ========== */
.post-item {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.post-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    z-index: 1;
}

.post-item:hover::before {
    width: 4px;
}

.post-item:hover {
    background: rgba(102, 126, 234, 0.02);
    transform: translateX(5px);
}

.post-item:last-child {
    border-bottom: none;
}

.post-header {
    display: flex;
    gap: 15px;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.post-thumbnail {
    width: 200px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 2em;
}

.post-thumbnail::before {
    content: '🎮';
    position: absolute;
    opacity: 0.5;
}

.post-thumbnail img {
    position: relative;
    z-index: 1;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.post-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.post-item:hover .post-title {
    color: #667eea;
}

.post-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-meta::before {
    content: '📅';
    font-size: 14px;
}

.post-excerpt {
    color: #555;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.post-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    position: relative;
    z-index: 2;
}

.expand-indicator {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 5px;
    transition: transform 0.3s ease;
}

.post-item.expanded .expand-indicator {
    transform: rotate(180deg);
}

.post-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.post-item.expanded .post-details {
    display: block;
}

.post-full-content {
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}

.post-full-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-posts h3 {
    margin-bottom: 15px;
    font-size: 1.5em;
    color: #2c3e50;
    font-weight: 300;
}

.no-posts p {
    color: #888;
    font-size: 1.1em;
}

/* ========== 解析功能组件 ========== */
.parse-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

.parse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
}

.parse-title {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.parse-toggle {
    color: #6c757d;
    transition: transform 0.3s ease;
}

.parse-section.expanded .parse-toggle {
    transform: rotate(180deg);
}

.parse-content {
    margin-top: 15px;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.parse-section.expanded .parse-content {
    display: block;
}

.parse-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
    white-space: nowrap;
    min-width: 100px;
}

.parse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, #218838, #1e7e34);
}

.parse-action-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    text-align: center;
}

.parse-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 200px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    margin: 0 auto;
}

.parse-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.3);
}

.parse-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.parse-icon {
    font-size: 16px;
}

.parse-text {
    font-weight: 500;
}

.parse-reload-section {
    margin-top: 10px;
    text-align: center;
}

.parse-reload-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.parse-reload-link:hover {
    color: #495057;
    text-decoration: underline;
}

.parse-result {
    min-height: 20px;
}

.parse-loading {
    color: #007bff;
    font-style: italic;
}

.parse-error {
    color: #dc3545;
    background: #f8d7da;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
}

.parse-success {
    color: #155724;
}

.download-links {
    margin-top: 10px;
}

.download-link {
    display: block;
    padding: 8px 12px;
    margin: 5px 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
}

.download-link:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    text-decoration: none;
    color: #495057;
}

.download-link:before {
    content: "📥 ";
    margin-right: 5px;
}

/* ========== 模态框组件 ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.close {
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.close:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modal-body {
    padding: 30px;
    line-height: 1.8;
    color: #333;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-body h1, .modal-body h2, .modal-body h3, 
.modal-body h4, .modal-body h5, .modal-body h6 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.modal-body a:hover {
    border-bottom-color: #667eea;
}

.modal-meta {
    background: #f8f9fa;
    padding: 15px 30px;
    border-top: 1px solid #e9ecef;
    color: #666;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========== 分页组件 ========== */

/* ========== 卡密验证组件 ========== */
.key-section {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    z-index: 100;
    overflow: hidden;
}

.key-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px;
    font-size: 1.2em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.key-content {
    padding: 20px;
}

.key-status {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    display: none;
}

.key-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.key-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.key-input:focus {
    outline: none;
    border-color: #28a745;
}

.verify-key-btn {
    width: 100%;
    padding: 10px 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.verify-key-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.key-info {
    margin-top: 15px;
    font-size: 14px;
    color: #6c757d;
}

.key-info p {
    margin: 0;
}

.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 12px 18px;
    margin: 0 5px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 6px;
    text-decoration: none;
    color: #667eea;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.pagination a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pagination .current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .carousel-container {
        height: 250px;
    }

    .carousel-card {
        flex: 0 0 250px;
    }

    .search-section {
        padding: 25px 20px;
    }

    .search-section h1 {
        font-size: 1.8em;
    }

    .search-form {
        flex-direction: column;
        gap: 15px;
    }

    .search-btn {
        width: 100%;
        padding: 18px;
    }

    .key-section {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin-bottom: 20px;
    }

    .post-item {
        padding: 15px;
    }

    .post-header {
        flex-direction: column;
        gap: 15px;
    }

    .post-thumbnail {
        width: 100%;
        height: 180px;
        order: -1;
    }

    .post-content {
        order: 1;
    }

    .post-actions {
        order: 2;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-top: 10px;
    }

    .post-title {
        font-size: 1.2em;
        text-align: center;
    }

    .post-meta {
        justify-content: center;
    }

    .expand-indicator {
        text-align: center;
    }

    .parse-btn {
        padding: 12px 24px;
        font-size: 14px;
        min-width: 140px;
        white-space: nowrap;
    }

    .parse-section {
        margin-top: 20px;
        padding: 20px 15px;
    }

    .parse-submit-btn {
        width: 100%;
        min-width: auto;
        padding: 15px 20px;
        font-size: 16px;
    }

    .parse-result {
        margin-top: 15px;
    }

    .download-links {
        margin-top: 15px;
    }

    .download-link {
        padding: 12px 15px;
        margin: 8px 0;
        font-size: 14px;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }

    .modal-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .modal-title {
        font-size: 1.3em;
    }

    .close {
        padding: 10px 20px;
        font-size: 13px;
    }

    .modal-body {
        padding: 20px 15px;
    }

    .modal-meta {
        padding: 15px 20px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .pagination a, .pagination span {
        padding: 10px 14px;
        font-size: 14px;
        margin: 2px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 200px;
    }

    .carousel-card {
        flex: 0 0 200px;
    }

    .search-section {
        padding: 20px 15px;
    }

    .search-section h1 {
        font-size: 1.5em;
    }

    .post-item {
        padding: 12px;
    }

    .post-thumbnail {
        height: 160px;
    }

    .post-title {
        font-size: 1.1em;
    }

    .parse-btn {
        padding: 10px 20px;
        font-size: 13px;
        min-width: 120px;
    }

    .parse-section {
        padding: 15px 10px;
    }

    .parse-submit-btn {
        padding: 14px 18px;
        font-size: 15px;
    }

    .modal-content {
        width: 98%;
        margin: 2% auto;
        max-height: 90vh;
    }

    .modal-header {
        padding: 12px 15px;
    }

    .modal-title {
        font-size: 1.2em;
    }

    .modal-body {
        padding: 15px 12px;
    }

    .pagination a, .pagination span {
        padding: 8px 10px;
        font-size: 13px;
        margin: 1px;
    }
}
