/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-image {
    height: 50px;
    width: auto;
}

.logo span {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #000;
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: #000;
}

/* Main Content */
.main {
    padding: 1rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #000;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

/* Category Section */
.category-section {
    max-width: 1000px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-size: 1.8rem;
    font-weight: 400;
    color: #000;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #666;
    font-size: 1rem;
    font-weight: 300;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.available-categories,
.selected-categories {
    background: #fff;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 400px;
}

.available-categories h4,
.selected-categories h4 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #000;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.categories-list {
    min-height: 320px;
}

/* Category Card */
.category-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
}

.category-card:hover {
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.category-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.category-card.selected {
    background: #000;
    color: #fff;
    border-color: #000;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
}

.category-title i {
    font-size: 1.1rem;
}

.category-pages {
    background: rgba(0,0,0,0.1);
    color: #666;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.category-card.selected .category-pages {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.category-description {
    color: #666;
    font-size: 0.9rem;
    font-weight: 300;
}

.category-card.selected .category-description {
    color: rgba(255,255,255,0.8);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 280px;
    color: #999;
    text-align: center;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.empty-state p {
    margin-top: 1rem;
    font-weight: 300;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
}

.btn-primary {
    background: #000;
    color: #fff;
    border: 2px solid #000;
}

.btn-primary:hover:not(:disabled) {
    background: #333;
    border-color: #333;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

.btn-secondary {
    background: #fff;
    color: #000;
    border: 2px solid #000;
}

.btn-secondary:hover {
    background: #000;
    color: #fff;
    transform: translateY(-1px);
}

/* Progress Section */
.progress-section {
    max-width: 500px;
    margin: 0 auto 3rem;
}

.progress-card {
    background: #fff;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.progress-header h4 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #000;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar {
    background: #f0f0f0;
    border-radius: 4px;
    height: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #000;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    color: #666;
    font-weight: 300;
    font-size: 0.95rem;
}

/* Success Section */
.success-section {
    max-width: 500px;
    margin: 0 auto 3rem;
}

.success-card {
    background: #fff;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.success-icon {
    font-size: 3rem;
    color: #000;
    margin-bottom: 1rem;
}

.success-card h4 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #000;
    margin-bottom: 1rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Footer */
.footer {
    background: #000;
    color: #fff;
    padding: 2rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.5rem;
}

.footer-brand h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-weight: 300;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 300;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    font-weight: 300;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    border: 2px solid #000;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000;
    color: #fff;
}

.modal-header h4 {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Drag & Drop States */
.drag-over {
    border-color: #000 !important;
    background: #f8f9fa !important;
}

.drag-active {
    border-style: dashed !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .success-actions {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}