/* Tool Hero Section - Required by tool-page-structure.mdc */
.tool-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.hero-text {
    flex: 1;
    min-width: 260px;
}

.hero-text h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 1rem;
    margin-top: 0;
}

@media (max-width: 767px) {
    .hero-text h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.125rem);
    }
}

/* Instagram Downloader Interface */
.instagram-downloader-interface {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Downloader Card */
.downloader-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.header-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-radius: 12px;
    color: white;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

/* Input Section */
.input-section {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.url-input-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.url-input {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #1a1a1a;
    transition: all 0.2s ease;
    min-width: 0;
}

.url-input:focus {
    outline: none;
    border-color: #e6683c;
    box-shadow: 0 0 0 3px rgba(230, 104, 60, 0.1);
}

.url-input::placeholder {
    color: #a0aec0;
}

.download-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    position: relative;
}

.download-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 67, 0.3);
}

.download-button:active:not(:disabled) {
    transform: translateY(0);
}

.download-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.input-hint {
    font-size: 0.8125rem;
    color: #718096;
    margin: 0;
}

/* Notice Box */
.notice-box {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.notice-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notice-content {
    flex: 1;
}

.notice-text {
    font-size: 0.875rem;
    color: #92400e;
    margin: 0;
    line-height: 1.5;
}

/* Preview Section */
.preview-section {
    animation: fadeIn 0.3s ease;
}

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

.preview-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.preview-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.close-button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    color: #4a5568;
    transition: all 0.2s ease;
    padding: 0;
}

.close-button:hover {
    background: #edf2f7;
    color: #1a1a1a;
}

.preview-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f7fafc;
    margin-bottom: 1rem;
}

.preview-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px;
    object-fit: contain;
}

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

.preview-image-wrapper:hover .image-overlay {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.save-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    background: #ffffff;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.save-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.preview-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 0.875rem;
}

.info-text {
    font-size: 0.875rem;
    color: #0369a1;
    margin: 0;
    text-align: center;
}

/* Error Section */
.error-section {
    animation: fadeIn 0.3s ease;
}

.error-card {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.error-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.error-content {
    flex: 1;
}

.error-title {
    font-size: 1rem;
    font-weight: 600;
    color: #991b1b;
    margin: 0 0 0.5rem 0;
}

.error-text {
    font-size: 0.875rem;
    color: #7f1d1d;
    margin: 0;
    line-height: 1.5;
}

/* Mobile Responsive Styles */
@media (max-width: 767px) {
    .instagram-downloader-interface {
        margin-top: 1.5rem;
        gap: 1rem;
    }

    .downloader-card {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .card-header {
        margin-bottom: 1.25rem;
    }

    .header-icon {
        width: 40px;
        height: 40px;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .url-input-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .download-button {
        width: 100%;
        justify-content: center;
    }

    .preview-card {
        padding: 1.25rem;
    }

    .preview-image {
        max-height: 400px;
    }

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

    .save-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .downloader-card {
        padding: 1.25rem;
    }

    .card-title {
        font-size: 1.125rem;
    }

    .url-input {
        font-size: 0.9375rem;
        padding: 0.75rem;
    }

    .download-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}
