/* Homepage Hero Section Styles */

/* Remove top padding on homepage */
.homepage-hero .container,
.homepage-hero .main-container {
    padding-top: 0;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 20px 20px 40px;
    position: relative;
    overflow: visible;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center top, rgba(255, 150, 200, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* Lottie Animation Container */
.hero-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    height: 160px;
}

.hero-animation lottie-player {
    width: 140px;
    height: 140px;
    filter: drop-shadow(0 0 40px rgba(255, 150, 200, 0.4));
    position: relative;
    z-index: 2;
}

/* Floating Stars Container */
.stars-container {
    position: absolute;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

/* Individual floating star */
.floating-star {
    position: absolute;
    opacity: 0;
}

.floating-star svg {
    width: 100%;
    height: 100%;
}

/* Star size variations */
.floating-star.star-sm { width: 14px; height: 14px; }
.floating-star.star-md { width: 18px; height: 18px; }
.floating-star.star-lg { width: 22px; height: 22px; }

/* Animation for stars emanating from center */
@keyframes emanate {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    20% {
        opacity: 0.9;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0.6);
        opacity: 0;
    }
}

.floating-star:nth-child(1)  { --tx: -120px; --ty: -80px;  animation: emanate 2.8s ease-out infinite; animation-delay: 0s; }
.floating-star:nth-child(2)  { --tx: 100px;  --ty: -90px;  animation: emanate 3s ease-out infinite; animation-delay: 0.15s; }
.floating-star:nth-child(3)  { --tx: -80px;  --ty: 100px;  animation: emanate 2.6s ease-out infinite; animation-delay: 0.3s; }
.floating-star:nth-child(4)  { --tx: 110px;  --ty: 70px;   animation: emanate 3.2s ease-out infinite; animation-delay: 0.45s; }
.floating-star:nth-child(5)  { --tx: -30px;  --ty: -120px; animation: emanate 2.9s ease-out infinite; animation-delay: 0.6s; }
.floating-star:nth-child(6)  { --tx: 50px;   --ty: 110px;  animation: emanate 3.1s ease-out infinite; animation-delay: 0.75s; }
.floating-star:nth-child(7)  { --tx: -110px; --ty: 20px;   animation: emanate 2.7s ease-out infinite; animation-delay: 0.9s; }
.floating-star:nth-child(8)  { --tx: 130px;  --ty: -20px;  animation: emanate 3s ease-out infinite; animation-delay: 1.05s; }
.floating-star:nth-child(9)  { --tx: -60px;  --ty: -110px; animation: emanate 2.8s ease-out infinite; animation-delay: 1.2s; }
.floating-star:nth-child(10) { --tx: 80px;   --ty: -60px;  animation: emanate 3.2s ease-out infinite; animation-delay: 1.35s; }
.floating-star:nth-child(11) { --tx: -130px; --ty: -30px;  animation: emanate 2.9s ease-out infinite; animation-delay: 1.5s; }
.floating-star:nth-child(12) { --tx: 60px;   --ty: 90px;   animation: emanate 3s ease-out infinite; animation-delay: 1.65s; }
.floating-star:nth-child(13) { --tx: -90px;  --ty: 60px;   animation: emanate 2.7s ease-out infinite; animation-delay: 1.8s; }
.floating-star:nth-child(14) { --tx: 120px;  --ty: 30px;   animation: emanate 3.1s ease-out infinite; animation-delay: 1.95s; }
.floating-star:nth-child(15) { --tx: -140px; --ty: 50px;   animation: emanate 2.8s ease-out infinite; animation-delay: 2.1s; }
.floating-star:nth-child(16) { --tx: 70px;   --ty: -100px; animation: emanate 3s ease-out infinite; animation-delay: 2.25s; }
.floating-star:nth-child(17) { --tx: -50px;  --ty: 120px;  animation: emanate 2.9s ease-out infinite; animation-delay: 2.4s; }
.floating-star:nth-child(18) { --tx: 140px;  --ty: -50px;  animation: emanate 2.7s ease-out infinite; animation-delay: 2.55s; }
.floating-star:nth-child(19) { --tx: -100px; --ty: -100px; animation: emanate 3.2s ease-out infinite; animation-delay: 2.7s; }
.floating-star:nth-child(20) { --tx: 90px;   --ty: 100px;  animation: emanate 2.8s ease-out infinite; animation-delay: 2.85s; }
.floating-star:nth-child(21) { --tx: -70px;  --ty: -70px;  animation: emanate 3s ease-out infinite; animation-delay: 3s; }
.floating-star:nth-child(22) { --tx: 40px;   --ty: -130px; animation: emanate 2.9s ease-out infinite; animation-delay: 3.15s; }


/* Fix: Reduce top padding on homepage - move hero up */
.hero-section {
    margin-top: -60px;
}

/* Override narrow .tm-main width on homepage */
.tm-main.homepage-content {
    width: 100%;
    max-width: 1200px;
}

/* Wide content pages (stars/buy, premium/buy) */
.tm-main.wide-content-page {
    width: 100%;
    max-width: 1000px;
}

.wide-content-page .buy-section {
    max-width: 480px;
    margin: 0 auto;
}

.wide-content-page .seo-content-section,
.wide-content-page .seo-faq-section {
    max-width: 100%;
}

.wide-content-page .seo-grid-3 {
    grid-template-columns: repeat(2, 1fr);
}

@media screen and (max-width: 700px) {
    .wide-content-page .seo-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Homepage form wrapper adjustments */
.homepage-form-wrapper .buy-section {
    padding: 0;
}

.homepage-form-wrapper .tm-main-form-group {
    text-align: left;
}

.homepage-form-wrapper .tm-main-form-label {
    text-align: left;
    display: block;
}

.homepage-form-wrapper .tm-main-intro-header,
.homepage-form-wrapper .tm-main-intro-text {
    display: none;
}

/* Align star quantity labels to the left */
.homepage-form-wrapper .tm-radio-label {
    text-align: left;
}

/* Center emanating stars properly */
.floating-star {
    left: 50%;
    top: 50%;
}

/* Hero Title */
.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-title .highlight {
    color: #FFD951;
    position: relative;
}

@media screen and (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: 1.1rem;
    color: #8b949e;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Trust Signals */
.trust-signals {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c9d1d9;
    font-size: 0.95rem;
}

.trust-item svg {
    width: 22px;
    height: 22px;
    color: #4db2ff;
    flex-shrink: 0;
}

.trust-item .trust-value {
    font-weight: 600;
    color: #ffffff;
}

@media screen and (max-width: 600px) {
    .trust-signals {
        gap: 15px;
    }

    .trust-item {
        font-size: 0.85rem;
    }
}

/* Homepage form wrapper - uses original form styles */
.homepage-form-wrapper {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Make sure homepage form inherits all original styles from buy_section.css */
.homepage-form-wrapper .tm-main-search-form {
    background: transparent;
}

/* Stats Counter */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    flex-wrap: wrap;
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-value .accent {
    color: #FFD951;
}

.stat-label {
    font-size: 0.85rem;
    color: #8b949e;
}

@media screen and (max-width: 600px) {
    .stats-row {
        gap: 25px;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* Features Grid on Homepage */
.features-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card-compact {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.feature-card-compact:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(77, 178, 255, 0.3);
    transform: translateY(-3px);
}

.feature-card-compact .feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(77, 178, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-card-compact .feature-icon svg {
    width: 24px;
    height: 24px;
    color: #4db2ff;
}

.feature-card-compact h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.feature-card-compact p {
    font-size: 0.9rem;
    color: #8b949e;
    line-height: 1.5;
    margin: 0;
}

/* Improved Section Headers */
.section-header-large {
    text-align: center;
    margin-bottom: 40px;
}

.section-header-large h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.section-header-large p {
    color: #8b949e;
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Additional floating particles */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 217, 81, 0.3);
    border-radius: 50%;
    animation: particle-float 8s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; animation-delay: 2s; }
.particle:nth-child(3) { left: 50%; animation-delay: 4s; }
.particle:nth-child(4) { left: 75%; animation-delay: 1s; }
.particle:nth-child(5) { left: 90%; animation-delay: 3s; }

@keyframes particle-float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Hide old premium options grid on homepage (will replace with better layout) */
.homepage-redesign .tm-main-premium-options {
    display: none;
}

/* ===== LIVE ORDERS SECTION ===== */
.live-orders-section .tm-section-header-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-live 2s ease-in-out infinite;
}

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

.live-orders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media screen and (max-width: 700px) {
    .live-orders-grid {
        grid-template-columns: 1fr;
    }
}

.live-order-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
}

.live-order-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.live-order-card.highlight {
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.3);
}

/* New order entering from top */
.live-order-card.entering {
    opacity: 0;
    transform: translateY(-15px);
}

.live-order-card.entered {
    animation: fadeInGlow 0.5s ease-out forwards;
}

@keyframes fadeInGlow {
    0% {
        box-shadow: 0 0 20px 5px rgba(77, 178, 255, 0.5);
        background: rgba(77, 178, 255, 0.15);
    }
    100% {
        box-shadow: none;
        background: rgba(255, 255, 255, 0.03);
    }
}

/* Old order exiting at bottom */
.live-order-card.exiting {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.live-order-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.live-order-icon svg {
    width: 24px;
    height: 24px;
}

.live-order-info {
    flex: 1;
    min-width: 0;
}

.live-order-username {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-order-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.live-order-quantity {
    font-size: 13px;
    color: #FFD700;
    font-weight: 600;
}

.live-order-time {
    font-size: 12px;
    color: #6e7681;
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .hero-section {
        padding: 30px 15px 40px;
    }

    .hero-form-card {
        padding: 20px;
        border-radius: 16px;
    }

    .hero-animation lottie-player {
        width: 140px;
        height: 140px;
    }
}
