:root {
    --primary-color: #4f46e5;
    --secondary-color: #818cf8;
    --background-color: #ffffff;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
}

.dark-mode {
    --background-color: #1f2937;
    --text-color: #f3f4f6;
    --border-color: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header */
.main-header {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.logo-container:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.logo-container:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 4px;
}

.logo-container img {
    width: 150px;
    height: auto;
}

.logo {
    width: 40px;
    height: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.theme-toggle {
    background: var(--background-color);
    border: 2px solid var(--border-color);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05) rotate(15deg);
}

.theme-toggle:hover .theme-icon {
    color: #fff;
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle:focus {
    outline: 3px solid rgba(79, 70, 229, 0.4);
    outline-offset: 2px;
}

.theme-icon {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    margin: 0 auto; /* Centralizado sem margens laterais para ads */
    position: relative;
}

.ad-left, .ad-right {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    z-index: 100;
    display: none; /* Oculto para anúncios */
}

.ad-left {
    left: 0;
}

.ad-right {
    right: 0;
}

.ad-bottom {
    width: 100%;
    max-width: 728px;
    margin: 0 auto 1.5rem;
    padding: 0 1rem;
    display: none; /* Oculto para anúncios */
}

.content-ads-bottom {
    background: var(--background-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px;
}

.content-ads-bottom img {
    width: 100%;
    height: auto;
    display: block;
}

.sticky-ad {
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px;
    margin: 10px;
}

.content-ads-left img,
.content-ads-right img {
    width: 100%;
    height: auto;
    display: block;
}

.download-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.url-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--background-color);
    color: var(--text-color);
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.download-button {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.download-button:focus {
    outline: 3px solid rgba(79, 70, 229, 0.4);
    outline-offset: 2px;
}

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

/* Progress Bar */
.progress-container {
    margin: 1.5rem 0;
}

.progress-wrapper {
    background-color: var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    height: 2rem;
}

#progress-bar {
    width: 0;
    height: 100%;
    background-color: var(--success-color);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#check-icon {
    color: white;
    font-size: 1.5rem;
    animation: checkAnimation 0.5s ease;
}

@keyframes checkAnimation {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Features Section */
.features-section {
    /*margin-top: 4rem;*/
}

.features-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.feature-card {
    background-color: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Footer */
.main-footer {
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 4rem;
}

.main-footer .container {
    margin-top: 0;
}

.main-footer p {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }

    .download-button {
        width: 100%;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .logo-container img {
        width: 120px;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
}

/* Status Messages */
.status-message {
    margin-top: 1rem;
    font-size: 0.9rem;
}

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

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.download-button:active {
    animation: pulse 0.3s ease-in-out;
}

/* Modo escuro */
body.dark-mode .sticky-ad {
    background: #1a1a1a;
    box-shadow: 0 2px 10px rgba(255,255,255,0.1);
}

body.dark-mode .why-choose-section {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .why-choose-item h4,
body.dark-mode .why-choose-item p {
    color: var(--text-color);
}

body.dark-mode .theme-icon {
    color: #fbbf24;
}

body.dark-mode .theme-toggle:hover .theme-icon {
    color: #fff;
}

body.dark-mode .content-ads-top,
body.dark-mode .content-ads-bottom {
    background: #1a1a1a;
}

/* Seção de instruções - Como baixar do Instagram */
.how-to-section {
    background: linear-gradient(90deg, #4f46e5 60%, #818cf8 100%);
    color: #fff;
    border-radius: 18px;
    padding: 2.5rem 2rem 2rem 2rem;
    margin: 3rem 0 0 0;
    box-shadow: 0 4px 24px rgba(79,70,229,0.08);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.how-to-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -1px;
}

.how-to-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.how-to-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.how-to-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    margin-top: 2px;
}

.how-to-icon i {
    font-size: 1.5rem;
    color: #fff;
}

.how-to-step {
    margin-bottom: 0.3rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.how-to-list p {
    font-size: 1rem;
    color: #f3f4f6;
    margin: 0;
}

@media (max-width: 768px) {
    .how-to-section {
        padding: 1.5rem 0.7rem 1.2rem 0.7rem;
        font-size: 0.98rem;
    }
    .how-to-title {
        font-size: 1.3rem;
    }
    .how-to-list li {
        gap: 0.7rem;
    }
    .how-to-icon {
        width: 40px;
        height: 40px;
    }
    .how-to-icon i {
        font-size: 1.2rem;
    }
}

/* Seção Por que escolher o Link2Vid */
.why-choose-section {
    background: #fff;
    border-radius: 18px;
    border: 2px solid #a5b4fc;
    box-shadow: 0 4px 24px rgba(79,70,229,0.06);
    padding: 2.5rem 2rem 2rem 2rem;
    margin: 3rem 0 0 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.why-choose-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.2rem;
    text-align: center;
    color: #273c75;
}

.why-choose-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.why-choose-item {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.why-choose-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
}

.why-choose-icon i {
    font-size: 2.5rem;
    color: #fff;
}

.why-choose-item h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #273c75;
    margin-bottom: 0.3rem;
}

.why-choose-item p {
    font-size: 1rem;
    color: #222;
    margin: 0;
}

@media (max-width: 768px) {
    .why-choose-section {
        padding: 1.2rem 0.5rem 1.2rem 0.5rem;
    }
    .why-choose-title {
        font-size: 1.3rem;
    }
    .why-choose-grid {
        gap: 1.2rem;
    }
    .why-choose-item {
        gap: 1rem;
    }
    .why-choose-icon {
        width: 50px;
        height: 50px;
    }
    .why-choose-icon i {
        font-size: 1.5rem;
    }
    .why-choose-item h4 {
        font-size: 1.05rem;
    }
}

/* Seção de Perguntas Frequentes (FAQ) */
.faq-section {
    margin: 3rem auto 0 auto;
    max-width: 900px;
    padding: 0 1rem 2rem 1rem;
}

.faq-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.2rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.faq-item {
    background: var(--background-color);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(79,70,229,0.06);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.15);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    padding: 1.2rem 3.5rem 1.2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.faq-question:hover {
    background-color: rgba(79, 70, 229, 0.05);
}

.faq-question:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.faq-question::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    font-size: 1rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    font-size: 1rem;
    color: var(--text-color);
    background: var(--background-color);
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), padding 0.3s, opacity 0.3s;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 1.2rem 1.5rem;
    opacity: 1;
    transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1), padding 0.3s, opacity 0.3s;
}

@media (max-width: 768px) {
    .faq-title {
        font-size: 1.3rem;
    }
    .faq-answer, .faq-question {
        font-size: 0.98rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Ad Top no Header */
.ad-top {
    width: 100%;
    max-width: 970px;
    margin: 0 auto 1rem auto;
    padding: 0 1rem;
    display: none; /* Oculto para anúncios */
    justify-content: center;
    align-items: center;
}

.content-ads-top {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-ads-top img {
    width: 100%;
    max-width: 970px;
    height: auto;
    display: block;
}

@media (max-width: 1024px) {
    .ad-top, .content-ads-top img {
        max-width: 728px;
    }
}

@media (max-width: 768px) {
    .ad-top, .content-ads-top img {
        max-width: 100%;
    }
    .ad-top {
        margin-bottom: 0.5rem;
    }
}
