.imports-page {
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: var(--spacing-xl);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
}

.section-header h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* File Upload Section */
.upload-section {
    max-width: 900px;
    margin: 0 auto var(--spacing-xl) auto;
    padding: 0 var(--spacing-md);
}

.upload-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.upload-card.under-construction {
    pointer-events: none;
    opacity: 0.6;
}

.upload-card.under-construction::before {
    content: 'UNDER CONSTRUCTION';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 59, 48, 0.3);
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 0 20px rgba(255, 59, 48, 0.5);
}

.drop-zone {
    border: 2px dashed rgba(0, 122, 255, 0.3);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: rgba(0, 122, 255, 0.05);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--color-accent);
    background: rgba(0, 122, 255, 0.1);
}

.drop-zone-content {
    pointer-events: none;
    width: 100%;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md) auto;
    opacity: 0.6;
}

.drop-zone h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.drop-zone p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
}

.instruction-steps {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-lg);
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: var(--spacing-xs);
}

.instruction-step:last-child {
    margin-bottom: 0;
}

.instruction-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: rgba(0, 122, 255, 0.2) !important;
    color: #007AFF !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1;
}

.instruction-text {
    flex: 1;
    line-height: 1.5;
}

.file-input {
    display: none;
}

.selected-files {
    margin-top: var(--spacing-md);
}

.file-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(0, 122, 255, 0.1);
    border-radius: 8px;
    margin-bottom: var(--spacing-xs);
}

.file-item.error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.file-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.file-size {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.file-remove {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.file-remove:hover {
    color: #ff3b30;
}

.form-group {
    margin-top: var(--spacing-md);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.error-message {
    color: #ff3b30;
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
    display: none;
}

.error-message.visible {
    display: block;
}

.create-btn {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.create-btn:hover:not(:disabled) {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
}

.create-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.create-btn.loading {
    opacity: 0.7;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.create-btn.loading .spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.success-message {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.3);
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
    display: none;
}

.success-message.visible {
    display: block;
}

.success-message p {
    color: #34c759;
    font-weight: 500;
}

/* Templates Section */
.templates-section {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.template-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 122, 255, 0.2);
    border-color: var(--color-accent);
}

.template-image-container {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    background: var(--color-bg-secondary);
    cursor: pointer;
    overflow: hidden;
}

.template-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.template-image-container:hover .template-image {
    transform: scale(1.05);
}

.template-content {
    padding: var(--spacing-md);
}

.template-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.template-description {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.template-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

.template-download-btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
}

/* Modal for image preview */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: zoom-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    font-weight: 300;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .imports-page {
        padding-top: 80px;
    }

    .templates-grid {
        grid-template-columns: 1fr;
    }

    .modal-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}
