.lnkd-image-downloader-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    box-sizing: border-box;
}

.lnkd-image-downloader-wrapper *,
.lnkd-image-downloader-wrapper *::before,
.lnkd-image-downloader-wrapper *::after {
    box-sizing: border-box;
}

.lnkd-app {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, #ecfeff 100%);
    border-radius: 24px;
}

.lnkd-header {
    text-align: center;
    margin-bottom: 48px;
}

.lnkd-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.lnkd-logo-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.lnkd-logo-icon {
    width: 32px;
    height: 32px;
    color: #ffffff;
}

.lnkd-logo h1 {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.lnkd-subtitle {
    color: #6b7280;
    font-size: 18px;
    margin: 0;
}

.lnkd-main-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
}

.lnkd-input-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 640px) {
    .lnkd-input-section {
        flex-direction: row;
    }
}

.lnkd-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.lnkd-input-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: #9ca3af;
    pointer-events: none;
}

.lnkd-url-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    transition: all 0.2s ease;
    outline: none;
}

.lnkd-url-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.lnkd-url-input::placeholder {
    color: #9ca3af;
}

.lnkd-url-input:disabled {
    background: #f9fafb;
    cursor: not-allowed;
}

.lnkd-fetch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.lnkd-fetch-btn:hover:not(:disabled) {
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.lnkd-fetch-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.lnkd-fetch-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.lnkd-fetch-btn svg {
    width: 20px;
    height: 20px;
}

.lnkd-spinner-icon {
    width: 20px;
    height: 20px;
    animation: lnkd-spin 1s linear infinite;
}

@keyframes lnkd-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.lnkd-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    font-size: 14px;
    color: #6b7280;
}

.lnkd-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lnkd-feature-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

.lnkd-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #dc2626;
    margin-top: 16px;
}

.lnkd-error svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.lnkd-results {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
}

.lnkd-results-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.lnkd-results-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lnkd-count {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.lnkd-selected {
    font-size: 14px;
    color: #6b7280;
    padding: 4px 12px;
    background: #f3f4f6;
    border-radius: 20px;
}

.lnkd-results-actions {
    display: flex;
    gap: 12px;
}

.lnkd-action-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #3b82f6;
    background: transparent;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lnkd-action-btn:hover {
    background: rgba(59, 130, 246, 0.1);
}

.lnkd-download-all-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lnkd-download-all-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -4px rgba(59, 130, 246, 0.5);
}

.lnkd-download-all-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.lnkd-download-all-btn svg {
    width: 18px;
    height: 18px;
}

.lnkd-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

@media (min-width: 768px) {
    .lnkd-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

.lnkd-image-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.lnkd-image-card:hover {
    border-color: #3b82f6;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

.lnkd-image-card.selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.lnkd-image-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.lnkd-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lnkd-image-card:hover .lnkd-image-container img {
    transform: scale(1.05);
}

.lnkd-checkbox-wrapper {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.lnkd-image-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #3b82f6;
    border-radius: 4px;
}

.lnkd-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lnkd-image-card:hover .lnkd-image-overlay {
    opacity: 1;
}

.lnkd-overlay-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.lnkd-download-single-btn,
.lnkd-preview-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    background: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 110px;
    justify-content: center;
}

.lnkd-download-single-btn:hover,
.lnkd-preview-btn:hover {
    background: #f3f4f6;
    transform: scale(1.05);
}

.lnkd-download-single-btn svg,
.lnkd-preview-btn svg {
    width: 16px;
    height: 16px;
}

.lnkd-preview-btn {
    background: rgba(255, 255, 255, 0.9);
}

.lnkd-preview-btn:hover {
    background: #ffffff;
}

.lnkd-image-info {
    padding: 12px;
    text-align: center;
}

.lnkd-image-number {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.lnkd-empty-state {
    text-align: center;
    padding: 60px 24px;
}

.lnkd-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: #d1d5db;
}

.lnkd-empty-icon svg {
    width: 100%;
    height: 100%;
}

.lnkd-empty-state h3 {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
}

.lnkd-empty-state p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 24px;
}

.lnkd-supported-formats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.lnkd-supported-formats > span:first-child {
    font-size: 14px;
    color: #9ca3af;
}

.lnkd-format-tag {
    font-size: 12px;
    font-weight: 500;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
}

.lnkd-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #9ca3af;
}

.lnkd-footer p {
    margin: 0;
}

.lnkd-loading-init {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 16px;
}

.lnkd-loading-init .lnkd-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: lnkd-spin 0.8s linear infinite;
}

.lnkd-loading-init p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

@media (max-width: 640px) {
    .lnkd-app {
        padding: 32px 16px;
        border-radius: 16px;
    }

    .lnkd-header {
        margin-bottom: 32px;
    }

    .lnkd-logo-icon-wrapper {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .lnkd-logo-icon {
        width: 28px;
        height: 28px;
    }

    .lnkd-logo h1 {
        font-size: 28px;
    }

    .lnkd-subtitle {
        font-size: 16px;
    }

    .lnkd-main-card {
        padding: 24px 16px;
    }

    .lnkd-url-input {
        padding: 14px 14px 14px 44px;
        font-size: 14px;
    }

    .lnkd-fetch-btn {
        width: 100%;
        padding: 14px 24px;
    }

    .lnkd-features {
        gap: 16px;
    }

    .lnkd-results {
        padding: 16px;
    }

    .lnkd-results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .lnkd-results-actions {
        width: 100%;
        flex-direction: column;
    }

    .lnkd-action-btn,
    .lnkd-download-all-btn {
        width: 100%;
        justify-content: center;
    }

    .lnkd-image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .lnkd-empty-state {
        padding: 40px 16px;
    }

    .lnkd-empty-icon {
        width: 60px;
        height: 60px;
    }

    .lnkd-image-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.4);
    }

    .lnkd-overlay-buttons {
        flex-direction: column;
        gap: 6px;
    }

    .lnkd-download-single-btn,
    .lnkd-preview-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 90px;
    }

    .lnkd-download-single-btn svg,
    .lnkd-preview-btn svg {
        width: 14px;
        height: 14px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .lnkd-image-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.4);
    }
}
