/* Design Tokens & Variables */
:root {
    --bg-color: #080b11;
    --surface-color: rgba(13, 18, 30, 0.75);
    --surface-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f9fafb;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --glow-gradient: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #10b981, #6366f1);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    
    --font-heading: 'Outfit', 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
    
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Base Resets & Structure */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Background Glowing Orbs (Visible & GPU accelerated) */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.55;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.65) 0%, rgba(139, 92, 246, 0.1) 75%);
    top: -150px;
    right: -100px;
    animation: floatOrb1 15s infinite alternate ease-in-out;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.45) 0%, rgba(219, 39, 119, 0) 75%);
    bottom: -200px;
    left: -150px;
    animation: floatOrb2 18s infinite alternate ease-in-out;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.35) 0%, rgba(20, 184, 166, 0) 70%);
    top: 35%;
    left: 15%;
    animation: floatOrb3 14s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-80px, 120px, 0) scale(1.2); }
}

@keyframes floatOrb2 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(120px, -100px, 0) scale(1.25); }
}

@keyframes floatOrb3 {
    0% { transform: translate3d(0, 0, 0) scale(0.9); }
    100% { transform: translate3d(60px, 60px, 0) scale(1.15); }
}

/* Typography & Links */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
}

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

a:hover {
    color: #ffffff;
}

/* Navbar with Glassmorphic Blur */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 11, 17, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--surface-border);
    padding: 1.25rem 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
    transition: var(--transition-normal);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Container Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero Section */
.hero-section {
    padding: 7rem 1.5rem 5rem;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

.badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    padding: 0.4rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

.hero-section h1 {
    font-size: 3.8rem;
    line-height: 1.15;
    margin-bottom: 0.25rem;
}

/* Continuously Shifting Animated Gradient Text */
.gradient-text {
    background: var(--glow-gradient);
    background-size: 400% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradientShift 8s linear infinite;
}

@keyframes textGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1.25rem;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-family: var(--font-body);
    transform: translate3d(0, 0, 0);
}

.btn-primary {
    background: var(--primary-gradient);
    background-size: 200% auto;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
}

.btn-primary:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.6);
    background-position: right center;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--surface-border);
    color: #ffffff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translate3d(0, -3px, 0);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.btn-text:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.btn-text-danger:hover {
    color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Glassmorphic Premium Cards with Glowing Hover Border */
.glass-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    transition: all var(--transition-normal);
}

/* Glowing Border Effect for Tool Container */
.tool-container {
    position: relative;
    z-index: 1;
}

.tool-container::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.15;
    filter: blur(8px);
    transition: opacity var(--transition-normal), filter var(--transition-normal);
    pointer-events: none;
}

.tool-container:hover::before {
    opacity: 0.45;
    filter: blur(14px);
}

/* Sections General */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3.5rem;
}

.section-header h2 {
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Analyzer Section & Tool */
.analyzer-section {
    padding: 4rem 0;
}

.tool-tabs {
    display: flex;
    border-bottom: 1px solid var(--surface-border);
    background: rgba(0, 0, 0, 0.35);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 1.4rem 1rem;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #ffffff;
    border-bottom-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.08);
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.tab-content {
    padding: 2.5rem;
    min-height: 480px;
}

/* Tool Grid (Instant Finder) */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
}

@media (max-width: 768px) {
    .tool-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.input-panel, .search-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
    display: block;
    letter-spacing: 0.5px;
}

textarea {
    width: 100%;
    height: 340px;
    background: rgba(4, 6, 10, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    resize: none;
    outline: none;
    transition: var(--transition-normal);
}

textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
    background: rgba(4, 6, 10, 0.85);
}

.panel-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Search Box & Inputs */
.search-box-wrapper {
    position: relative;
    width: 100%;
}

.search-box-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(4, 6, 10, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-normal);
}

.search-box-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
    background: rgba(4, 6, 10, 0.85);
}

.search-box-wrapper input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

/* Results Stats & Info */
.results-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0 0.25rem;
}

.badge-status {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Active Status Dot Pulse */
.badge-success::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-success);
    display: inline-block;
    animation: statusPulse 1.5s infinite;
}

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

.badge-neutral {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Results Container */
.results-container {
    height: 270px;
    background: rgba(4, 6, 10, 0.4);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    transition: var(--transition-normal);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 0.75rem;
}

.empty-icon {
    font-size: 3rem;
    opacity: 0.5;
    animation: iconPulse 3s infinite alternate ease-in-out;
}

@keyframes iconPulse {
    0% { transform: scale(0.95); opacity: 0.4; }
    100% { transform: scale(1.05); opacity: 0.6; }
}

/* Table Design */
.table-wrapper {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background-color: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.results-table th {
    position: sticky;
    top: 0;
    background: rgba(12, 17, 29, 0.96);
    padding: 0.9rem 1.2rem;
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    border-bottom: 1px solid var(--surface-border);
    z-index: 1;
    letter-spacing: 0.5px;
}

.results-table td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.results-table tr:last-child td {
    border-bottom: none;
}

.results-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
}

.results-table tr.highlighted td {
    background: rgba(99, 102, 241, 0.15);
    color: #ffffff;
    font-weight: 600;
    border-bottom-color: rgba(99, 102, 241, 0.25);
}

/* Netlify Iframe Container */
.iframe-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--surface-border);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: var(--shadow-md);
}

.iframe-browser-bar {
    height: 44px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
    gap: 0.5rem;
}

.iframe-browser-bar .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.iframe-browser-bar .red { background-color: #ff5f56; }
.iframe-browser-bar .yellow { background-color: #ffbd2e; }
.iframe-browser-bar .green { background-color: #27c93f; }

.browser-address {
    margin-left: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 2rem;
    border-radius: 20px;
    width: 60%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

@media (max-width: 480px) {
    .browser-address {
        display: none;
    }
}

iframe {
    width: 100%;
    height: 520px;
    border: none;
    display: block;
}

/* Instructions Section */
.instructions-section {
    padding: 6rem 0;
}

.instruction-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.2rem;
}

@media (max-width: 768px) {
    .instruction-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.instruction-card {
    padding: 3rem 2.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transform: translate3d(0, 0, 0);
    transition: all var(--transition-normal);
}

.instruction-card:hover {
    transform: translate3d(0, -8px, 0);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.15);
}

.card-number {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    opacity: 0.85;
}

.instruction-card h3 {
    font-size: 1.4rem;
}

.instruction-card p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    opacity: 0.9;
}

/* About Section */
.about-section {
    padding: 5rem 0 7rem;
    display: flex;
    justify-content: center;
}

.profile-card {
    width: 100%;
    max-width: 600px;
    padding: 3.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.8rem;
    transform: translate3d(0, 0, 0);
    transition: all var(--transition-normal);
}

.profile-card:hover {
    transform: translate3d(0, -6px, 0);
    border-color: rgba(168, 85, 247, 0.35);
    box-shadow: 0 15px 35px rgba(168, 85, 247, 0.15);
}

.profile-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, rgba(168, 85, 247, 0) 70%);
    top: 0;
    z-index: 0;
    pointer-events: none;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    z-index: 1;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
    animation: avatarPulse 4s infinite alternate ease-in-out;
}

@keyframes avatarPulse {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(168, 85, 247, 0.3); }
    100% { transform: scale(1.05); box-shadow: 0 0 30px rgba(168, 85, 247, 0.5); }
}

.profile-title h2 {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.profile-bio {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.6;
    z-index: 1;
    letter-spacing: 0.2px;
}

.profile-socials {
    z-index: 1;
    margin-top: 0.5rem;
}

.profile-link {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all var(--transition-fast);
}

.profile-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.25);
}

/* Footer Section */
.footer {
    border-top: 1px solid var(--surface-border);
    padding: 3rem 1.5rem;
    text-align: center;
    background: rgba(5, 7, 12, 0.9);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        gap: 0.75rem;
    }
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.credit {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.creator-name {
    font-weight: 700;
    color: #ffffff;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Responsive Overrides & Mobile Optimization */
@media (max-width: 768px) {
    .navbar {
        padding: 1.1rem;
    }
    .nav-links {
        display: none;
    }
    .hero-section {
        padding: 5.5rem 1rem 3.5rem;
    }
    .hero-section h1 {
        font-size: 2.6rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }
    .section-header h2 {
        font-size: 2rem;
    }
    .tab-content {
        padding: 1.5rem;
    }
    .profile-card {
        padding: 2.5rem 2rem;
    }
}

/* Staggered fadeInUp Animations for Page Load (GPU-accelerated) */
.hero-content {
    animation: fadeInUp 0.9s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.analyzer-section {
    animation: fadeInUp 0.9s cubic-bezier(0.18, 0.89, 0.32, 1.28) 0.15s forwards;
    opacity: 0;
}

.instructions-section {
    animation: fadeInUp 0.9s cubic-bezier(0.18, 0.89, 0.32, 1.28) 0.3s forwards;
    opacity: 0;
}

.about-section {
    animation: fadeInUp 0.9s cubic-bezier(0.18, 0.89, 0.32, 1.28) 0.45s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 35px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
