/* ========================================
   IPforAgents - Homepage Extra Styles
   Starfield, floating elements, all the pizzazz
   ======================================== */

/* ========================================
   Starfield Background
   ======================================== */

.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.stars-layer-1 {
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 160px 120px, rgba(0, 255, 136, 0.8), transparent),
        radial-gradient(1px 1px at 200px 50px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 220px 150px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 260px 90px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 300px 130px, rgba(0, 212, 255, 0.7), transparent);
    background-size: 320px 200px;
    animation: starfield-drift 60s linear infinite;
}

.stars-layer-2 {
    background-image:
        radial-gradient(1px 1px at 100px 20px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 180px 100px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 50px 180px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 250px 60px, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 150px 140px, rgba(255, 255, 255, 0.3), transparent);
    background-size: 280px 220px;
    animation: starfield-drift 90s linear infinite reverse;
}

.stars-layer-3 {
    background-image:
        radial-gradient(2px 2px at 70px 60px, rgba(0, 255, 136, 0.6), transparent),
        radial-gradient(2px 2px at 200px 180px, rgba(0, 212, 255, 0.5), transparent),
        radial-gradient(2px 2px at 350px 100px, rgba(168, 85, 247, 0.5), transparent);
    background-size: 400px 250px;
    animation: starfield-drift 120s linear infinite, star-twinkle 4s ease-in-out infinite;
}

@keyframes starfield-drift {
    from {
        transform: translateY(0) translateX(0);
    }
    to {
        transform: translateY(-200px) translateX(-100px);
    }
}

@keyframes star-twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Shooting stars */
.shooting-star {
    position: absolute;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8), rgba(0, 255, 136, 0.6), transparent);
    opacity: 0;
    animation: shooting-star 3s ease-in-out infinite;
}

.shooting-star:nth-child(1) {
    top: 20%;
    left: 30%;
    animation-delay: 0s;
    transform: rotate(-45deg);
}

.shooting-star:nth-child(2) {
    top: 40%;
    left: 60%;
    animation-delay: 2s;
    transform: rotate(-35deg);
}

.shooting-star:nth-child(3) {
    top: 15%;
    left: 80%;
    animation-delay: 4s;
    transform: rotate(-50deg);
}

@keyframes shooting-star {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0) rotate(-45deg);
    }
    5% {
        opacity: 1;
    }
    20% {
        opacity: 0;
        transform: translateX(-200px) translateY(200px) rotate(-45deg);
    }
    100% {
        opacity: 0;
    }
}

/* ========================================
   Animated Logo
   ======================================== */

.animated-logo {
    display: inline-block;
    animation: logo-glow 3s ease-in-out infinite, logo-rotate 20s linear infinite;
}

@keyframes logo-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(0, 255, 136, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.8)) drop-shadow(0 0 40px rgba(0, 212, 255, 0.4));
    }
}

@keyframes logo-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   Nav Login Button
   ======================================== */

.nav-login {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-login svg {
    transition: transform 0.3s ease;
}

.nav-login:hover svg {
    transform: translateX(3px);
}

/* ========================================
   Mobile Menu Button
   ======================================== */

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
}

/* ========================================
   Trust Badges
   ======================================== */

.trust-badges {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.trust-badge:hover {
    border-color: var(--accent-green);
    background: rgba(0, 255, 136, 0.05);
}

.trust-badge svg {
    stroke: var(--accent-green);
    flex-shrink: 0;
}

/* ========================================
   Code Panel Enhancements
   ======================================== */

.code-panel {
    position: relative;
}

.code-panel-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: panel-glow 6s ease-in-out infinite;
}

@keyframes panel-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.code-decoration {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent-green);
    opacity: 0.2;
    pointer-events: none;
    animation: float-decoration 6s ease-in-out infinite;
}

.code-decoration-1 {
    top: -20px;
    right: 20px;
    animation-delay: 0s;
}

.code-decoration-2 {
    bottom: 20px;
    left: -30px;
    animation-delay: 2s;
    color: var(--accent-cyan);
}

.code-decoration-3 {
    top: 50%;
    right: -40px;
    animation-delay: 4s;
    color: var(--accent-purple);
}

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

/* ========================================
   Stats Bar Enhancements
   ======================================== */

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 10px;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent-green);
}

.stat-icon.blocked-icon svg {
    stroke: var(--text-muted);
}

/* ========================================
   Logos Section
   ======================================== */

.logos-section {
    position: relative;
    z-index: 1;
    padding: 2rem 0 4rem;
    overflow: hidden;
}

.logos-label {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logos-track {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
}

.logos-slide {
    display: flex;
    gap: 4rem;
    animation: logos-scroll 30s linear infinite;
}

.logo-placeholder {
    flex-shrink: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.logo-placeholder:hover {
    opacity: 1;
}

.logo-img {
    flex-shrink: 0;
    height: 40px;
    width: auto;
    opacity: 0.85;
    transition: all 0.3s ease;
}

.logo-img:hover {
    opacity: 1;
}

@keyframes logos-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ========================================
   Section Badge
   ======================================== */

.section-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

/* ========================================
   Comparison Visual
   ======================================== */

.comparison-visual {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.failure-rate {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rate-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 80px;
}

.rate-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.rate-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s var(--ease-out);
}

.rate-fill.bad {
    background: linear-gradient(90deg, var(--accent-red), #ff6666);
}

.rate-fill.good {
    background: var(--gradient-main);
    animation: rate-pulse 2s ease-in-out infinite;
}

@keyframes rate-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.rate-value {
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 50px;
    text-align: right;
}

.rate-value.bad { color: var(--accent-red); }
.rate-value.good { color: var(--accent-green); }

/* ========================================
   Feature Metric
   ======================================== */

.feature-metric {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   Pulse Ring Effect
   ======================================== */

.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-green);
    border-radius: 12px;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* ========================================
   How It Works Section
   ======================================== */

.how-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.how-steps {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.how-step {
    flex: 1;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-main);
    color: #000;
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: 50%;
}

.step-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-visual {
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-green);
    overflow-x: auto;
}

.success-visual {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-green);
}

.success-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 136, 0.2);
    border-radius: 50%;
    font-size: 0.8rem;
    animation: success-pulse 1.5s ease-in-out infinite;
}

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

.step-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    flex-shrink: 0;
    padding-top: 2rem;
}

.step-connector svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-muted);
    animation: connector-pulse 2s ease-in-out infinite;
}

@keyframes connector-pulse {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(5px); }
}

/* ========================================
   Testimonials Section
   ======================================== */

.testimonials-section {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s var(--ease-out);
}

.testimonial-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-style: italic;
}

.testimonial-content p::before {
    content: '"';
    font-size: 2rem;
    color: var(--accent-green);
    line-height: 0;
    margin-right: 0.25rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-main);
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50%;
}

.author-info strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.author-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   CTA Section Enhancements
   ======================================== */

.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-bg-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cta-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.cta-orb-1 {
    width: var(--cta-orb-lg, clamp(200px, 40vw, 400px));
    height: var(--cta-orb-lg, clamp(200px, 40vw, 400px));
    background: var(--accent-green);
    top: -100px;
    left: 20%;
    animation: orb-float 8s ease-in-out infinite;
}

.cta-orb-2 {
    width: var(--cta-orb-md, clamp(150px, 30vw, 300px));
    height: var(--cta-orb-md, clamp(150px, 30vw, 300px));
    background: var(--accent-cyan);
    bottom: -100px;
    right: 20%;
    animation: orb-float 10s ease-in-out infinite reverse;
}

@keyframes orb-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.1); }
}

.cta-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   Footer Enhancements
   ======================================== */

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    transform: translateY(-2px);
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========================================
   Glow Effect for Buttons
   ======================================== */

.glow-effect {
    position: relative;
}

.glow-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-main);
    border-radius: inherit;
    filter: blur(15px);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.glow-effect:hover::before {
    opacity: 0.5;
}

/* ========================================
   Floating Element Animation
   ======================================== */

.floating-element {
    animation: floating 6s ease-in-out infinite;
}

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

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 1024px) {
    .how-steps {
        flex-direction: column;
        gap: 2rem;
    }

    .step-connector {
        display: none;
    }

    .testimonials-section {
        grid-template-columns: 1fr;
    }

    .trust-badges {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
    }

    /* Logo images responsive */
    .logo-img {
        height: 32px;
    }

    .logos-slide {
        gap: 2.5rem;
    }

    /* How section responsive */
    .how-section {
        padding: 4rem var(--space-m, 1rem);
    }

    .how-step {
        padding: 1.5rem;
    }

    /* Testimonials responsive */
    .testimonials-section {
        padding: 3rem var(--space-m, 1rem);
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    /* Stat icon responsive */
    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-icon svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    /* Hide CTA orbs on small screens - too distracting */
    .cta-orb {
        display: none;
    }

    /* Smaller logos */
    .logo-img {
        height: 28px;
    }

    .logos-slide {
        gap: 2rem;
    }

    /* More compact how section */
    .how-section {
        padding: 3rem var(--space-s, 0.75rem);
    }

    .how-step {
        padding: 1.25rem;
    }

    .step-content h3 {
        font-size: 1rem;
    }

    .step-content p {
        font-size: 0.85rem;
    }

    .step-visual {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    /* Compact testimonials */
    .testimonials-section {
        padding: 2rem var(--space-s, 0.75rem);
    }

    .testimonial-card {
        padding: 1.25rem;
    }

    .testimonial-content p {
        font-size: 0.9rem;
    }

    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    /* Compact section badge */
    .section-badge {
        padding: 0.3rem 0.75rem;
        font-size: 0.7rem;
    }

    /* Footer social compact */
    .footer-social a {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 400px) {
    /* Foldable-specific adjustments */
    .logo-img {
        height: 24px;
    }

    .logos-slide {
        gap: 1.5rem;
    }

    .how-step {
        padding: 1rem;
    }

    .testimonial-card {
        padding: 1rem;
    }

    .shooting-star {
        display: none;
    }
}

/* ========================================
   Privacy Section
   ======================================== */

.privacy-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 900px) {
    .privacy-grid {
        grid-template-columns: 1fr;
    }
}
