/**
 * YTubeGuard Modern UI Design System
 * A clean, responsive, and modern design for all public pages
 * 
 * Version: 2.0 - Complete Redesign
 */

/* ========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ======================================== */
:root {
    /* Brand Colors */
    --yt-red: #e52d27;
    --yt-red-dark: #b31217;
    --yt-red-light: #ff5e57;
    --yt-black: #0f0f1b;
    --yt-white: #ffffff;
    --yt-gray-50: #f9fafb;
    --yt-gray-100: #f3f4f6;
    --yt-gray-200: #e5e7eb;
    --yt-gray-300: #d1d5db;
    --yt-gray-400: #9ca3af;
    --yt-gray-500: #6b7280;
    --yt-gray-600: #4b5563;
    --yt-gray-700: #374151;
    --yt-gray-800: #1f2937;
    --yt-gray-900: #111827;
    
    /* Semantic Colors */
    --color-primary: var(--yt-red);
    --color-primary-dark: var(--yt-red-dark);
    --color-primary-light: var(--yt-red-light);
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    
    /* Backgrounds */
    --bg-primary: var(--yt-white);
    --bg-secondary: var(--yt-gray-50);
    --bg-tertiary: var(--yt-gray-100);
    --bg-dark: var(--yt-black);
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    
    /* Text Colors */
    --text-primary: var(--yt-gray-900);
    --text-secondary: var(--yt-gray-600);
    --text-tertiary: var(--yt-gray-500);
    --text-inverse: var(--yt-white);
    
    /* Borders */
    --border-color: var(--yt-gray-200);
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-primary: 0 4px 14px 0 rgba(229, 45, 39, 0.35);
    --shadow-glow: 0 0 40px rgba(229, 45, 39, 0.15);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    --transition-bounce: 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-tooltip: 400;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f1117;
        --bg-secondary: #161b26;
        --bg-tertiary: #1d2433;
        --text-primary: #f3f4f6;
        --text-secondary: #9ca3af;
        --text-tertiary: #6b7280;
        --border-color: #2d3748;
    }
}

/* ========================================
   BASE STYLES
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--space-4);
}

/* ========================================
   LAYOUT UTILITIES
   ======================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 640px) {
    .container { padding: 0 var(--space-6); }
}

@media (min-width: 1024px) {
    .container { padding: 0 var(--space-8); }
}

.section {
    padding: var(--space-16) 0;
}

@media (min-width: 768px) {
    .section { padding: var(--space-20) 0; }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--yt-red) 0%, var(--yt-red-dark) 100%);
    color: var(--yt-white);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(229, 45, 39, 0.45);
    color: var(--yt-white);
}

.btn-secondary {
    background: var(--yt-gray-100);
    color: var(--yt-gray-800);
}

.btn-secondary:hover {
    background: var(--yt-gray-200);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--yt-red);
    color: var(--yt-red);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--yt-gray-100);
    color: var(--text-primary);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-6);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(229, 45, 39, 0.2);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--yt-red);
    box-shadow: 0 0 0 3px rgba(229, 45, 39, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    overflow: hidden;
    padding: var(--space-20) 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(229, 45, 39, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--yt-white);
    line-height: 1.1;
    margin-bottom: var(--space-6);
    letter-spacing: -0.02em;
}

.hero-title span {
    background: linear-gradient(135deg, var(--yt-red) 0%, #ff7675 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: var(--space-8);
    max-width: 600px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.hero-stats {
    display: flex;
    gap: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: left;
}

.stat-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--yt-white);
}

.stat-label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.feature-card {
    padding: var(--space-8);
    background: var(--bg-primary);
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(229, 45, 39, 0.3);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(229, 45, 39, 0.1) 0%, rgba(229, 45, 39, 0.05) 100%);
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--space-5);
    color: var(--yt-red);
    font-size: 1.5rem;
}

.feature-title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   HOW IT WORKS
   ======================================== */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

@media (min-width: 768px) {
    .steps-container {
        flex-direction: row;
        align-items: flex-start;
    }
}

.step-card {
    flex: 1;
    text-align: center;
    padding: var(--space-8);
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--yt-red);
    color: var(--yt-white);
    font-size: var(--text-xl);
    font-weight: 800;
    border-radius: var(--border-radius-full);
    margin: 0 auto var(--space-5);
    box-shadow: var(--shadow-primary);
}

.step-title {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.step-description {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* ========================================
   TESTIMONIALS
   ======================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.testimonial-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: var(--space-6);
    border: 1px solid var(--border-color);
}

.testimonial-content {
    font-size: var(--text-base);
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: var(--space-4);
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-full);
    background: linear-gradient(135deg, var(--yt-red) 0%, var(--yt-red-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--yt-white);
    font-weight: 700;
    font-size: var(--text-lg);
}

.testimonial-info h4 {
    font-size: var(--text-sm);
    font-weight: 700;
}

.testimonial-info span {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--yt-red) 0%, var(--yt-red-dark) 100%);
    padding: var(--space-16) 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--yt-white);
}

.cta-title {
    font-size: var(--text-3xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
}

.cta-description {
    font-size: var(--text-lg);
    opacity: 0.9;
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   PRICING CARDS
   ======================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-xl);
    padding: var(--space-8);
    border: 2px solid var(--border-color);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
}

.pricing-card.featured {
    border-color: var(--yt-red);
    transform: scale(1.05);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--yt-red) 0%, var(--yt-red-dark) 100%);
    color: var(--yt-white);
    font-size: var(--text-xs);
    font-weight: 700;
    padding: var(--space-1) var(--space-4);
    border-radius: var(--border-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.pricing-price {
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--yt-red);
    margin-bottom: var(--space-2);
}

.pricing-price span {
    font-size: var(--text-base);
    font-weight: 400;
    color: var(--text-tertiary);
}

.pricing-period {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-bottom: var(--space-6);
}

.pricing-features {
    list-style: none;
    margin-bottom: var(--space-8);
    text-align: left;
}

.pricing-features li {
    padding: var(--space-2) 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.pricing-features li::before {
    content: '✓';
    color: var(--color-success);
    font-weight: 700;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--yt-black);
    color: var(--yt-white);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.footer-logo img {
    height: 40px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.footer-title {
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--yt-white);
    margin-bottom: var(--space-4);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--yt-red);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-sm);
}

.footer-social {
    display: flex;
    gap: var(--space-4);
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    color: var(--yt-white);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--yt-red);
    transform: translateY(-2px);
}

/* ========================================
   RESPONSIVE HELPERS
   ======================================== */
.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-mobile { display: block; }
    .hide-desktop { display: none; }
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }

.w-full { width: 100%; }

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fadeIn { animation: fadeIn 0.6s ease forwards; }
.animate-slideInLeft { animation: slideInLeft 0.6s ease forwards; }
.animate-slideInRight { animation: slideInRight 0.6s ease forwards; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Stagger animations */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ========================================
   UTILITY CLASSES
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
