/* ==========================================
   INTERNET LIBRE CHILE - GitHub-Inspired Theme
   ========================================== */

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --border-color: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent-green: #3fb950;
    --accent-green-dark: #238636;
    --accent-blue: #58a6ff;
    --accent-purple: #a371f7;
    --accent-orange: #f0883e;
    --accent-red: #f85149;
    --gradient-1: linear-gradient(135deg, #3fb950 0%, #58a6ff 100%);
    --gradient-2: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
    --shadow-sm: 0 1px 0 rgba(27, 31, 36, 0.04);
    --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.25);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-green);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 160px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(63, 185, 80, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(88, 166, 255, 0.1), transparent);
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 900px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--accent-green);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--accent-green);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-green-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 0.9rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-green);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Urgent Banner */
.urgent-banner {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(90deg, var(--accent-red) 0%, var(--accent-orange) 100%);
    padding: 12px 0;
    animation: urgentPulse 3s infinite;
}

@keyframes urgentPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.9;
    }
}

.urgent-banner .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.urgent-icon {
    font-size: 1.2rem;
}

.urgent-text {
    font-weight: 500;
    color: #fff;
}

.urgent-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.urgent-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Share Section */
.share-section {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.share-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    color: #fff;
}

.share-btn.twitter {
    background: #000;
}

.share-btn.twitter:hover {
    background: #333;
}

.share-btn.reddit {
    background: #ff4500;
}

.share-btn.reddit:hover {
    background: #cc3700;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.whatsapp:hover {
    background: #1da851;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.facebook:hover {
    background: #0d65d9;
}

/* Steps Section */
.steps-section {
    background: var(--bg-secondary);
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.step-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.step-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-4px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Problem Cards */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.problem-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.problem-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.problem-card.highlight {
    border-color: var(--accent-orange);
    background: rgba(240, 136, 62, 0.05);
}

.problem-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.problem-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.problem-card p {
    color: var(--text-secondary);
}

/* Quote Box */
.quote-box {
    background: var(--bg-primary);
    border-left: 4px solid var(--accent-green);
    padding: 32px;
    border-radius: var(--radius-md);
    margin-bottom: 48px;
}

.quote-box blockquote p {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.quote-box cite {
    color: var(--accent-green);
    font-size: 1rem;
}

/* Links Box */
.links-box {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.links-box h3 {
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.link-card:hover {
    border-color: var(--accent-blue);
    background: rgba(88, 166, 255, 0.1);
}

/* Arguments */
.arguments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.argument-card {
    display: flex;
    gap: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
}

.argument-card:hover {
    border-color: var(--accent-purple);
    transform: translateX(8px);
}

.argument-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 60px;
}

.argument-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.argument-content p {
    color: var(--text-secondary);
}

/* Email Section */
.email-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 40px;
}

.email-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.email-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
}

.email-actions {
    display: flex;
    gap: 12px;
}

.email-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--accent-blue);
    word-break: break-all;
    line-height: 1.8;
}

.email-note {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Templates */
.templates-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.templates-section>h3 {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.template-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.tab-btn.active {
    background: var(--accent-green);
    color: #fff;
    border-color: var(--accent-green);
}

.template-panel {
    display: none;
}

.template-panel.active {
    display: block;
}

.template-panel h4 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.template-panel textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.7;
    resize: vertical;
    margin-bottom: 20px;
}

.template-panel textarea:focus {
    outline: none;
    border-color: var(--accent-green);
}

.template-actions {
    display: flex;
    gap: 12px;
}

/* Video Section */
.video-container {
    max-width: 900px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    margin-top: 24px;
    text-align: center;
}

.video-info h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.video-info p {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-main p {
    color: var(--text-secondary);
}

.footer-links h4 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent-green);
    color: #fff;
    padding: 16px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .email-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .argument-card {
        flex-direction: column;
        gap: 12px;
    }

    .argument-number {
        font-size: 1.5rem;
    }
}