/**
 * WP Category 3D - Styles
 */

.wp-category-3d-container {
    position: relative;
    display: flex;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    background: #1a1a2e;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Left panel - 3D Canvas */
.wp-category-3d-left-panel {
    position: relative;
    flex: 1 1 auto;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wp-category-3d-canvas-wrapper {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.wp-category-3d-canvas-wrapper canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

.wp-category-3d-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 40px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

/* Resizer */
.wp-category-3d-resizer {
    width: 6px;
    background: #0f3460;
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
    z-index: 5;
}

.wp-category-3d-resizer:hover {
    background: #e94560;
}

.wp-category-3d-resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
}

/* Right panel - Sidebar */
.wp-category-3d-right-panel {
    position: relative;
    flex: 0 0 400px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    z-index: 4;
}

.wp-category-3d-sidebar {
    width: 100%;
    height: 100%;
    background: #16213e;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wp-category-3d-sidebar-header {
    padding: 20px;
    background: #0f3460;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.wp-category-3d-sidebar-header h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

/* Search Input */
.wp-category-3d-search {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wp-category-3d-search:focus {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.5);
}

.wp-category-3d-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.wp-category-3d-sidebar-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Scrollbar */
.wp-category-3d-sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.wp-category-3d-sidebar-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

.wp-category-3d-sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.wp-category-3d-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

.category-info {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.3s ease-out;
}

.category-info h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: #e94560;
    letter-spacing: -0.5px;
}

.category-description {
    color: #b8c1cc;
    font-size: 15px;
    line-height: 1.6;
    margin: 10px 0;
}

.category-count {
    display: inline-block;
    background: rgba(78, 205, 196, 0.1);
    color: #4ecdc4;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 10px 0 0 0;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideUp 0.3s ease-out forwards;
    opacity: 0;
}

.post-item:nth-child(1) { animation-delay: 0.05s; }
.post-item:nth-child(2) { animation-delay: 0.1s; }
.post-item:nth-child(3) { animation-delay: 0.15s; }
.post-item:nth-child(4) { animation-delay: 0.2s; }
.post-item:nth-child(5) { animation-delay: 0.25s; }

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(233, 69, 96, 0.3);
}

.post-thumbnail {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #1a1a2e;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.08);
}

.post-content {
    padding: 18px;
}

.post-content h4 {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}

.post-content h4 a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.post-content h4 a:hover {
    color: #e94560;
}

.post-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin: 0 0 12px 0;
    display: block;
}

.post-excerpt {
    color: #b8c1cc;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category labels in 3D space */
.category-label {
    pointer-events: none;
    user-select: none;
    transition: opacity 0.2s;
}

/* Responsive design */
@media (max-width: 768px) {
    .wp-category-3d-container {
        flex-direction: column;
    }

    .wp-category-3d-left-panel {
        min-height: 300px;
        height: 50%;
    }

    .wp-category-3d-resizer {
        display: none;
    }

    .wp-category-3d-right-panel {
        width: 100%;
        min-width: 100%;
        height: 50%;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    }

    .wp-category-3d-sidebar-header {
        padding: 15px;
    }

    .wp-category-3d-sidebar-content {
        padding: 15px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.wp-category-3d-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Full-width mode */
.wp-category-3d-fullwidth {
    max-width: none;
    box-sizing: border-box;
}
