/**
 * Instagram Downloader Styles
 */

/* Reset and Base */
.ig-downloader-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ig-downloader-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    min-height: 600px;
}

/* Section Management */
.ig-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.ig-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.ig-header {
    text-align: center;
    margin-bottom: 30px;
}

.ig-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #262626;
}

/* Hero Section */
.ig-hero {
    text-align: center;
    margin-bottom: 50px;
}

.ig-title {
    font-size: 36px;
    font-weight: 800;
    color: #262626;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #F58529 0%, #DD2A7B 50%, #8134AF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ig-subtitle {
    font-size: 18px;
    color: #8e8e8e;
    margin-bottom: 40px;
}

/* Input Wrapper */
.ig-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.ig-input {
    width: 100%;
    padding: 18px 20px;
    font-size: 16px;
    border: 2px solid #dbdbdb;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    background: #fafafa;
}

.ig-input:focus {
    border-color: #DD2A7B;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(221, 42, 123, 0.15);
}

.ig-input::placeholder {
    color: #8e8e8e;
}

/* Buttons */
.ig-btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    outline: none;
}

.ig-btn-gradient {
    background: linear-gradient(135deg, #F58529 0%, #DD2A7B 50%, #8134AF 100%);
    color: white;
}

.ig-btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(221, 42, 123, 0.3);
}

.ig-btn-gradient:active {
    transform: translateY(0);
}

.ig-btn-secondary {
    background: #ffffff;
    color: #262626;
    border: 2px solid #dbdbdb;
}

.ig-btn-secondary:hover {
    border-color: #8e8e8e;
    background: #fafafa;
}

/* Error Message */
.ig-error-message {
    color: #ed4956;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.ig-error-message.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Features Grid */
.ig-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.ig-feature {
    text-align: center;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.ig-feature:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
}

.ig-feature-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.ig-feature-label {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 4px;
}

.ig-feature-sub {
    font-size: 12px;
    color: #8e8e8e;
}

/* Steps Section */
.ig-steps {
    text-align: center;
    margin-bottom: 50px;
}

.ig-steps h3 {
    font-size: 24px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 30px;
}

.ig-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.ig-step {
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
}

.ig-step-number {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #F58529 0%, #DD2A7B 50%, #8134AF 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.ig-step-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 6px;
}

.ig-step-desc {
    font-size: 13px;
    color: #8e8e8e;
}

/* Progress Container */
.ig-progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    text-align: center;
}

.ig-progress-title {
    font-size: 28px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 40px;
}

/* Linear Progress Bar */
.ig-progress-bar-wrapper {
    width: 100%;
    max-width: 500px;
    margin-bottom: 20px;
}

.ig-progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.ig-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #F58529 0%, #DD2A7B 50%, #8134AF 100%);
    border-radius: 999px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ig-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ig-progress-percent {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #F58529 0%, #DD2A7B 50%, #8134AF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 20px;
}

.ig-progress-status {
    font-size: 16px;
    color: #8e8e8e;
    margin-top: 15px;
    min-height: 24px;
}

/* Chakra Progress */
.ig-chakra-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.ig-chakra {
    display: block;
    margin: 0 auto;
}

.ig-chakra-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #F58529 0%, #DD2A7B 50%, #8134AF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Message Container */
.ig-message-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    text-align: center;
    padding: 40px;
}

.ig-message-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.ig-message-title {
    font-size: 32px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 15px;
}

.ig-message-text {
    font-size: 18px;
    color: #8e8e8e;
    margin-bottom: 20px;
    max-width: 500px;
    line-height: 1.6;
}

.ig-partner-suggest {
    font-size: 16px;
    color: #262626;
    font-weight: 600;
    margin: 15px 0;
}

.ig-message-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    width: 100%;
    max-width: 400px;
}

.ig-divider {
    color: #8e8e8e;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    margin: 10px 0;
}

.ig-divider::before,
.ig-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #dbdbdb;
}

.ig-divider::before {
    left: 0;
}

.ig-divider::after {
    right: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ig-downloader-container {
        padding: 15px;
    }

    .ig-title {
        font-size: 28px;
    }

    .ig-subtitle {
        font-size: 16px;
    }

    .ig-input {
        font-size: 14px;
        padding: 14px 16px;
    }

    .ig-btn {
        padding: 14px 24px;
        font-size: 14px;
    }

    .ig-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .ig-feature {
        padding: 15px;
    }

    .ig-feature-icon {
        font-size: 28px;
    }

    .ig-steps-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ig-progress-title {
        font-size: 22px;
    }

    .ig-chakra {
        width: 150px;
        height: 150px;
    }

    .ig-chakra-percent {
        font-size: 32px;
    }

    .ig-message-icon {
        font-size: 56px;
    }

    .ig-message-title {
        font-size: 24px;
    }

    .ig-message-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .ig-title {
        font-size: 24px;
    }

    .ig-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .ig-input-wrapper {
        gap: 12px;
    }

    .ig-message-container {
        padding: 20px;
    }
}