/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #fff;
    overflow-x: hidden;
    cursor: none;
}

/* 3D Cards Hero Container */
.cards-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    perspective: 1000px;
}

/* Grid Background */
.grid-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.15;
}

.grid-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.grid-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.float-element {
    position: absolute;
    animation: float3D 20s ease-in-out infinite;
    transform-style: preserve-3d;
}

.element-inner {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    transform: rotateX(45deg) rotateY(45deg);
    animation: rotate3D 10s linear infinite;
}

.element-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.element-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 10s;
}

.element-4 {
    top: 40%;
    right: 30%;
    animation-delay: 15s;
}

@keyframes float3D {
    0%, 100% {
        transform: translateY(0) translateZ(0) rotateX(0);
    }
    25% {
        transform: translateY(-30px) translateZ(50px) rotateX(180deg);
    }
    50% {
        transform: translateY(20px) translateZ(-30px) rotateX(360deg);
    }
    75% {
        transform: translateY(-10px) translateZ(20px) rotateX(180deg);
    }
}

@keyframes rotate3D {
    from { transform: rotateX(45deg) rotateY(45deg) rotateZ(0); }
    to { transform: rotateX(45deg) rotateY(45deg) rotateZ(360deg); }
}

/* Hero Container */
.hero-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.cards-header {
    margin-bottom: 60px;
    animation: fadeInDown 1s ease;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 3D Logo */
.logo-3d {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-cube {
    width: 40px;
    height: 40px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 10s linear infinite;
}

@keyframes rotateCube {
    from { transform: rotateX(0) rotateY(0); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

.cube-face {
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.cube-face.front { transform: translateZ(20px); }
.cube-face.back { transform: rotateY(180deg) translateZ(20px); }
.cube-face.right { transform: rotateY(90deg) translateZ(20px); }
.cube-face.left { transform: rotateY(-90deg) translateZ(20px); }
.cube-face.top { transform: rotateX(90deg) translateZ(20px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(20px); }

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 3D Navigation */
.nav-3d {
    display: flex;
    gap: 30px;
}

.nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    perspective: 100px;
    display: inline-block;
}

.link-text,
.link-hover {
    display: block;
    transition: all 0.3s ease;
}

.link-hover {
    position: absolute;
    top: 0;
    left: 0;
    color: #667eea;
    transform: rotateX(-90deg) translateY(100%);
    transform-origin: top;
}

.nav-link:hover .link-text {
    transform: rotateX(90deg) translateY(-100%);
    transform-origin: bottom;
}

.nav-link:hover .link-hover {
    transform: rotateX(0) translateY(0);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
}

.toggle-track {
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.theme-toggle.dark .toggle-thumb {
    transform: translateX(30px);
}

.icon-sun,
.icon-moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
}

.icon-sun {
    left: 8px;
}

.icon-moon {
    right: 8px;
}

/* Hero Content */
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: center;
}

/* Text Content */
.content-text {
    animation: fadeInLeft 1s ease;
}

.badge-3d {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 30px;
    margin-bottom: 30px;
    animation: pulse3D 2s ease-in-out infinite;
}

@keyframes pulse3D {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.badge-icon {
    font-size: 16px;
    animation: rotate 2s linear infinite;
}

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

.badge-text {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* 3D Title */
.hero-title-3d {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    perspective: 500px;
}

.title-line {
    display: block;
    margin-bottom: 10px;
}

.word {
    display: inline-block;
    margin-right: 15px;
    animation: wordFloat 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

.word:nth-child(2) { animation-delay: 0.2s; }
.word:nth-child(3) { animation-delay: 0.4s; }
.word:nth-child(4) { animation-delay: 0.6s; }

@keyframes wordFloat {
    0%, 100% { transform: translateY(0) rotateX(0); }
    50% { transform: translateY(-5px) rotateX(10deg); }
}

.gradient-word {
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

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

/* Description */
.hero-description-3d {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

/* 3D CTA Buttons */
.cta-group-3d {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.btn-3d {
    position: relative;
    padding: 16px 32px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: white;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.btn-3d.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-3d.secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
    transform: translateZ(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-3d:hover {
    transform: translateY(-3px) rotateX(-5deg);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-3d:hover .btn-reflection {
    opacity: 1;
}

/* Feature List */
.feature-list {
    display: flex;
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-icon {
    font-size: 20px;
}

.feature-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* 3D Cards Container */
.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    perspective: 1000px;
}

/* 3D Card */
.card-3d {
    width: 100%;
    height: 500px;
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
    animation: cardFloat 6s ease-in-out infinite;
}

.card-3d:nth-child(2) { animation-delay: 2s; }
.card-3d:nth-child(3) { animation-delay: 4s; }

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

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-3d:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

.card-front {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.card-back {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    transform: rotateY(180deg);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card Glow & Shine */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-3d:hover .card-glow {
    opacity: 1;
}

.card-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.card-3d:hover .card-shine {
    left: 100%;
}

/* Card Content */
.card-content {
    flex: 1;
}

.card-icon {
    margin-bottom: 20px;
}

.icon-3d {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 15px;
    color: #667eea;
    animation: iconPulse 3s ease-in-out infinite;
}

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

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

.card-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.stat {
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    font-size: 12px;
    color: #667eea;
}

.card-tags {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.tag {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: #667eea;
    color: #667eea;
}

/* Featured Card */
.card-3d.featured .card-front {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    border: 2px solid rgba(99, 102, 241, 0.3);
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 20px;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Card Footer */
.card-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-link:hover {
    gap: 12px;
}

.card-btn {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* Card Back Content */
.back-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,.1) 10px, rgba(255,255,255,.1) 20px);
}

.back-content h4 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: white;
}

.feature-list-card {
    list-style: none;
}

.feature-list-card li {
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    padding-left: 25px;
}

.feature-list-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Hero Bottom */
.hero-bottom {
    margin-top: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Testimonial */
.testimonial-3d {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    animation: fadeInUp 1s ease 0.5s both;
}

.testimonial-text {
    font-size: 1.125rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: white;
}

.author-role {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Mouse Indicator */
.mouse-3d {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: bounce3D 2s ease-in-out infinite;
}

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

.mouse-body {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 13px;
    position: relative;
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: wheelScroll 1.5s ease-in-out infinite;
}

@keyframes wheelScroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

.mouse-text {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
}

/* 3D Cursor */
.cursor-3d {
    pointer-events: none;
    position: fixed;
    z-index: 9999;
}

.cursor-ball {
    position: fixed;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #667eea, #764ba2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    mix-blend-mode: screen;
}

.cursor-trail {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Next Section */
.next-section {
    min-height: 100vh;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
}

.section-container {
    text-align: center;
}

.section-container h2 {
    font-size: 3rem;
    color: white;
    margin-bottom: 20px;
}

.section-container p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

@media (max-width: 768px) {
    body {
        cursor: auto;
    }
    
    .cursor-3d {
        display: none;
    }
    
    .nav-3d {
        display: none;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .card-3d {
        height: 350px;
    }
    
    .hero-title-3d {
        font-size: 2rem;
    }
    
    .cta-group-3d {
        flex-direction: column;
    }
    
    .btn-3d {
        width: 100%;
        justify-content: center;
    }
    
    .hero-bottom {
        flex-direction: column;
        gap: 40px;
    }
    
    .testimonial-3d {
        width: 100%;
    }
}