/* GIS社区专用样式 */

/* 导航栏样式调整 */
.navbar {
    position: relative;
}

.navbar .logo {
    transition: margin 0.3s ease;
}

.back-to-home a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-to-home a:hover {
    color: #e0e0e0;
}

/* 容器样式 */
.container {
    margin: 0 auto;
    padding: 0 2rem;
}

/* 搜索区域样式 */
.search-section {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
    padding: 3rem 0;
    text-align: center;
}

.search-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #00b4d8;
    text-shadow: 0 0 10px rgba(0, 180, 216, 0.3);
}

.search-section p {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto 2rem;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 50px;
    border: 1px solid #00b4d8;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: #e0e0e0;
    font-size: 1rem;
}

.search-box input::placeholder {
    color: #888;
}

.search-box button {
    padding: 1rem 1.5rem;
    background: #00b4d8;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #0099cc;
}

/* 筛选标签样式 */
.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-tab {
    padding: 0.5rem 1.5rem;
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid #00b4d8;
    color: #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-tab:hover,
.filter-tab.active {
    background: #00b4d8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 180, 216, 0.3);
}

/* 统计区域样式 */
.stats-section {
    background: #0a0a1a;
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 8px;
    border: 1px solid #00b4d8;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.stat-item i {
    font-size: 2.5rem;
    color: #00b4d8;
    margin-bottom: 1rem;
}

.stat-item h3 {
    font-size: 2rem;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: #b0b0b0;
}

/* 资源区域样式 */
.resources-section {
    background: #0a0a1a;
    padding: 3rem 0;
}

.resources-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.resources-header h2 {
    color: #00b4d8;
    font-size: 1.8rem;
}

.upload-btn {
    padding: 0.8rem 1.5rem;
    background: #00b4d8;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.upload-btn:hover {
    background: #0099cc;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 180, 216, 0.3);
}

/* 资源网格样式 */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

.resource-card {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 8px;
    border: 1px solid #00b4d8;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 450px;
    cursor: pointer;
    flex-direction: column;
    height: 100%;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 180, 216, 0.2);
}

.resource-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.resource-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.resource-card:hover .resource-image img {
    transform: scale(1.05);
}

.resource-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.3rem 0.8rem;
    color: white;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* .resource-badge.verified {
    background: #00b4d8;
} */

.resource-badge.reviewed {
    background: #28a745;
}

.resource-badge.pending {
    background: #ffc107;
    color: #333;
}

/* 分类标签样式 - 移到图片外部 */
.resource-category {
    position: relative;
    margin: -10px 15px 10px 15px;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 180, 216, 0.9);
    color: white;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-block;
    z-index: 10;
}

.resource-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.resource-title {
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.resource-description {
    color: #b0b0b0;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-height: 4.5em;
    max-height: 4.5em;
}

.resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
}

.resource-time {
    color: #888;
}

.resource-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 180, 216, 0.2);
    min-height: 50px;
    align-items: center;
}

.like-btn {
    padding: 0.5rem 0.8rem;
    border: 1px solid #00b4d8;
    background: transparent;
    color: #00b4d8;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
    justify-content: center;
    white-space: nowrap;
    min-width: 0;
}

.like-btn:hover {
    background: #00b4d8;
    color: white;
}

.like-btn.liked {
    background: #00b4d8;
    color: white;
}

/* 加载更多按钮 */
.load-more {
    text-align: center;
}

.load-more button {
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid #00b4d8;
    color: #00b4d8;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.load-more button:hover {
    background: #00b4d8;
    color: white;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
    margin: 2% auto;
    padding: 0;
    border: 1px solid #00b4d8;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    position: relative;
}

.modal-header {
    background: rgba(0, 180, 216, 0.1);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #00b4d8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #00b4d8;
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i {
    font-size: 1.2rem;
}

.close {
    color: #00b4d8;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #0099cc;
    background: rgba(0, 180, 216, 0.1);
}

/* 表单样式 */
#uploadForm {
    padding: 1.5rem;
    max-height: calc(96vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #00b4d8 rgba(26, 26, 46, 0.8);
}

#uploadForm::-webkit-scrollbar {
    width: 6px;
}

#uploadForm::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 3px;
}

#uploadForm::-webkit-scrollbar-thumb {
    background: #00b4d8;
    border-radius: 3px;
}

#uploadForm::-webkit-scrollbar-thumb:hover {
    background: #0099cc;
}

/* 表单行布局 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.8);
    color: #e0e0e0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #888;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 15px rgba(0, 180, 216, 0.2);
    background: rgba(26, 26, 46, 0.9);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2300b4d8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.4;
}

.form-group input[type="file"] {
    padding: 0.8rem;
    border: 2px dashed rgba(0, 180, 216, 0.3);
    background: rgba(0, 180, 216, 0.05);
    cursor: pointer;
    transition: all 0.3s;
}

.form-group input[type="file"]:hover {
    border-color: #00b4d8;
    background: rgba(0, 180, 216, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.form-note {
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid #00b4d8;
    border-radius: 8px;
    padding: 1rem;
    color: #b0b0b0;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.form-note i {
    color: #00b4d8;
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.submit-btn,
.cancel-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

.submit-btn {
    background: linear-gradient(135deg, #00b4d8 0%, #0099cc 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #0099cc 0%, #0088bb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.4);
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* 资源详情样式 */
.resource-details {
    padding: 2rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2.5rem;
    height: calc(80vh - 120px);
}

.resource-image {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.resource-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #00b4d8;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.resource-info {
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.resource-info::-webkit-scrollbar {
    width: 6px;
}

.resource-info::-webkit-scrollbar-track {
    background: rgba(0, 180, 216, 0.1);
    border-radius: 3px;
}

.resource-info::-webkit-scrollbar-thumb {
    background: rgba(0, 180, 216, 0.3);
    border-radius: 3px;
}

.resource-info::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 180, 216, 0.5);
}

.info-item {
    padding: 0.8rem;
    background: rgba(0, 180, 216, 0.05);
    border-radius: 8px;
    border-left: 3px solid #00b4d8;
    flex-shrink: 0;
}

.info-item strong {
    color: #00b4d8;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item p {
    color: #e0e0e0;
    line-height: 1.6;
    margin: 0;
}

.info-item a {
    color: #00b4d8;
    text-decoration: none;
    word-break: break-all;
}

.info-item a:hover {
    text-decoration: underline;
}

/* .status-verified {
    color: #00b4d8;
    font-weight: bold;
} */

.status-reviewed {
    color: #28a745;
    font-weight: bold;
}

.status-pending {
    color: #ffc107;
    font-weight: bold;
}

.resource-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding: 1rem;
    background: rgba(0, 180, 216, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 180, 216, 0.2);
    flex-shrink: 0;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .search-section h1 {
        font-size: 2rem;
    }
    
    .filter-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-tab {
        width: 200px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resources-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .resource-card {
        height: auto;
        min-height: 400px;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 98vh;
    }
    
    .resource-details {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
        height: calc(90vh - 120px);
    }
    
    .resource-image {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .resource-image img {
        height: 200px;
        width: auto;
        max-width: 100%;
        object-fit: cover;
    }
    
    .resource-info {
        overflow-y: auto;
        max-height: calc(90vh - 400px);
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    #uploadForm {
        padding: 1rem;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .search-section h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .search-box input,
    .search-box button {
        border-radius: 0;
    }
    
    .resource-image {
        height: 180px;
    }
    
    .resource-image img {
        height: 180px;
        max-width: 100%;
    }
    
    .resource-card {
        height: auto;
        min-height: 380px;
    }
}

.comment-btn-wrapper {
    position: relative;
    flex: 1;
}

.comment-btn {
    background: transparent;
    border: 1px solid #00b4d8;
    color: #00b4d8;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
    justify-content: center;
    white-space: nowrap;
    min-width: 0;
}
.comment-btn:hover {
    background: #00b4d8;
    color: #fff;
}

.comment-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff6b6b;
    color: white;
    border-radius: 10px;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
    border: 2px solid #1a1a2e;
    z-index: 1;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 5px;
    z-index: 3000;
    animation: slideIn 0.3s ease;
    font-weight: 500;
}

.notification.success {
    background: #00b4d8;
    color: white;
}

.notification.error {
    background: #ff6b6b;
    color: white;
}

.notification.info {
    background: #4ecdc4;
    color: white;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 详情按钮样式 */
.detail-btn {
    background: transparent;
    border: 1px solid #4ecdc4;
    color: #4ecdc4;
    border-radius: 5px;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
    justify-content: center;
    white-space: nowrap;
    min-width: 0;
}

.detail-btn:hover {
    background: #4ecdc4;
    color: #fff;
} 