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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
    --dark: #1a1a2e;
    --light: #ffffff;
    --gray: #6c757d;
    --accent: #667eea;
    --success: #4caf50;
    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-stack);
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden;
    background: #f8f9fa;
}

/* Gradient Mesh Background */
.gradient-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(45deg, #667eea20 25%, transparent 25%),
                linear-gradient(-45deg, #764ba220 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #f093fb20 75%),
                linear-gradient(-45deg, transparent 75%, #667eea20 75%);
    background-size: 50px 50px;
    background-position: 0 0, 0 25px, 25px -25px, -25px 0px;
    animation: meshFlow 20s linear infinite;
}

@keyframes meshFlow {
    0% { background-position: 0 0, 0 25px, 25px -25px, -25px 0px; }
    100% { background-position: 50px 50px, 50px 75px, 75px 25px, 25px 50px; }
}

/* Particle System */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 10s infinite;
}

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

/* Floating Navigation Orbs */
.floating-nav {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

.nav-orb {
    width: 16px;
    height: 16px;
    margin: 20px 0;
    background: var(--primary-gradient);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
    text-decoration: none;
}

.nav-orb:hover {
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
}

.nav-orb.active {
    transform: scale(1.3);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
}

.orb-tooltip {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark);
    color: var(--light);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.nav-orb:hover .orb-tooltip {
    opacity: 1;
}

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

/* Section Styles */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 0;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    isolation: isolate;
}

.glitch-text {
    font-size: 80px;
    font-weight: 900;
    margin-bottom: 20px;
    position: relative;
    letter-spacing: -2px;
}

.optimize-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

.hero-subtitle {
    font-size: 24px;
    color: var(--gray);
    margin-bottom: 60px;
    position: relative;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.rotating-text {
    position: relative;
    display: inline-block;
    vertical-align: top;
    min-width: 200px;
    text-align: left;
}

.rotating-text span {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    animation: rotateText 9s infinite;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.rotating-text span:nth-child(2) { animation-delay: 3s; }
.rotating-text span:nth-child(3) { animation-delay: 6s; }

@keyframes rotateText {
    0%, 33% { opacity: 0; transform: translateY(-50%) translateX(10px) scale(0.95); }
    8%, 25% { opacity: 1; transform: translateY(-50%) translateX(0) scale(1); }
    33%, 100% { opacity: 0; transform: translateY(-50%) translateX(-10px) scale(0.95); }
}

/* CTA Button */
.cta-button {
    display: inline-block;
    background: var(--primary-gradient);
    color: var(--light);
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.button-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--gray);
    margin-top: 5px;
}

/* Hero Visual */
.hero-visual {
    margin-top: 100px;
    position: relative;
    z-index: 1;
}

.prompt-transformer {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    min-height: 120px;
    padding-top: 15px; /* Ensure space for labels */
}

.prompt-input, .prompt-output {
    background: var(--light);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px; /* Space for label */
}

.prompt-input {
    width: 280px;
    min-height: 80px;
    flex-shrink: 0;
}

.prompt-input p,
.prompt-output p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prompt-input:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.prompt-output {
    width: 320px;
    min-height: 80px;
    flex-shrink: 0;
    border: 2px solid transparent;
    position: relative;
    isolation: isolate;
}

.prompt-output:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.1);
}

.prompt-output.typing {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.15);
}

/* Ensure label visibility */
.prompt-input::before,
.prompt-output::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 30px;
    pointer-events: none;
    z-index: 1;
}

.prompt-label {
    position: absolute;
    top: -12px;
    left: 20px;
    background: #f8f9fa;
    padding: 2px 12px;
    font-size: 12px;
    color: var(--gray);
    font-weight: 600;
    z-index: 10;
    line-height: 1.2;
    border-radius: 4px;
    box-shadow: 0 0 0 3px #f8f9fa;
    white-space: nowrap;
}

.transform-arrow {
    width: 60px;
    height: 60px;
}

.arrow-svg {
    width: 100%;
    height: 100%;
    stroke: var(--accent);
    stroke-width: 3;
    fill: none;
    animation: arrowPulse 2s infinite;
}

@keyframes arrowPulse {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--accent);
    animation: typing 4s steps(50, end) infinite, blink 1s step-end infinite;
    font-size: 14px;
    line-height: 1.4;
    max-width: 100%;
    display: inline-block;
}

@keyframes typing {
    0% { width: 0; }
    75% { width: 100%; }
    100% { width: 100%; }
}

@keyframes blink {
    0%, 50% { border-color: var(--accent); }
    51%, 100% { border-color: transparent; }
}

/* Tier Cards */
.tier-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.tier-card {
    background: var(--light);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tier-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.tier-card.featured {
    background: var(--primary-gradient);
    color: var(--light);
    transform: scale(1.05);
}

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

.tier-card h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.tier-subtitle {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 30px;
}

.tier-features {
    list-style: none;
    margin-bottom: 30px;
}

.tier-features li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tier-card.featured .tier-features li {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.tier-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: var(--light);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Process Flow */
.process-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 60px;
    position: relative;
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    color: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 30px;
}

.step-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.step-visual {
    margin-top: 30px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.browser-mockup {
    width: 200px;
    height: 120px;
    background: var(--light);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.selection-animation {
    position: absolute;
    top: 30px;
    left: 20px;
    width: 160px;
    height: 20px;
    background: rgba(102, 126, 234, 0.3);
    animation: selectText 3s infinite;
}

@keyframes selectText {
    0%, 100% { width: 0; }
    50% { width: 160px; }
}

.context-menu-mockup {
    background: var(--light);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
}

.menu-item {
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(102, 126, 234, 0.1);
}

.process-connector {
    flex: 0 0 100px;
    height: 2px;
    background: linear-gradient(to right, var(--accent), transparent);
    position: relative;
}

.process-connector::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid var(--accent);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

/* Security Grid */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.security-card {
    background: var(--light);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s;
}

.security-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.security-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.security-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

/* Privacy Section */
.privacy {
    background: #f8f9fa;
}

.privacy-content {
    background: var(--light);
    border-radius: 20px;
    padding: 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.privacy-summary {
    text-align: center;
    margin-bottom: 60px;
}

.privacy-summary h3 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--accent);
}

.privacy-details {
    display: grid;
    gap: 40px;
}

.privacy-section {
    border-left: 4px solid var(--accent);
    padding-left: 30px;
}

.privacy-section h4 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--dark);
}

.privacy-section ul {
    list-style: none;
}

.privacy-section li {
    padding: 8px 0;
    position: relative;
    padding-left: 20px;
}

.privacy-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.update-date {
    font-style: italic;
    color: var(--gray);
    margin-top: 10px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--light);
    padding: 60px 0 30px;
}

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

.footer-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-logo-img {
    width: 24px;
    height: 24px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--light);
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .floating-nav {
        right: 20px;
    }
    
    .glitch-text {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 50px;
        min-height: 32px;
    }
    
    .rotating-text {
        min-width: 150px;
    }
    
    .prompt-transformer {
        flex-direction: column;
        gap: 30px;
        max-width: 90%;
        padding-top: 20px;
    }
    
    .prompt-input, .prompt-output {
        width: 100%;
        min-width: 280px;
        margin-top: 15px;
    }
    
    .transform-arrow {
        transform: rotate(90deg);
        align-self: center;
    }
    
    .process-flow {
        flex-direction: column;
        gap: 40px;
    }
    
    .process-connector {
        display: none;
    }
    
    .tier-cards {
        grid-template-columns: 1fr;
    }
    
    .tier-card.featured {
        transform: scale(1);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .privacy-content {
        padding: 30px;
    }
}

/* Back to Home Button */
.back-home {
    position: fixed;
    top: 30px;
    left: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    background: var(--light);
}

.back-home svg {
    transition: transform 0.3s ease;
}

.back-home:hover svg {
    transform: translateX(-5px);
}

/* Standalone Page Styles */
.standalone-page {
    min-height: 100vh;
    padding: 100px 0 50px;
}

.standalone-page .section-title {
    font-size: 3rem;
    margin-bottom: 2rem;
}

/* Privacy Policy Table Styles */
.data-table {
    overflow-x: auto;
    margin: 20px 0;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.data-table th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
}

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

.data-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.privacy-section h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.update-date {
    color: var(--gray);
    font-style: italic;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .back-home {
        top: 20px;
        left: 20px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .standalone-page {
        padding: 80px 0 30px;
    }
    
    .standalone-page .section-title {
        font-size: 2rem;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px;
    }
    
    .privacy-section h3 {
        font-size: 1.25rem;
    }
}

/* Fun Sticker Button */
.hero-visual .sticker-button {
    position: absolute !important;
    top: -240px !important;
    left: -180px !important;
    width: 120px !important;
    height: 120px !important;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 50%, #ff6b6b 100%) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transform: rotate(-12deg) !important;
    box-shadow: 
        0 8px 20px rgba(255, 107, 107, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    border: 3px solid #ffffff !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    z-index: 100 !important;
    overflow: hidden !important;
    animation: stickerFloat 4s ease-in-out infinite !important;
}

.hero-visual .sticker-button:hover {
    transform: rotate(-8deg) scale(1.1) !important;
    box-shadow: 
        0 12px 30px rgba(255, 107, 107, 0.4),
        0 6px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.hero-visual .sticker-button:active {
    transform: rotate(-10deg) scale(0.95) !important;
    transition: all 0.1s ease !important;
}

.hero-visual .sticker-text {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    z-index: 2 !important;
    position: relative !important;
}

.sticker-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.sticker-button:hover .sticker-shine {
    transform: translateX(100%);
}

@keyframes stickerFloat {
    0%, 100% {
        transform: rotate(-12deg) translateY(0px);
    }
    50% {
        transform: rotate(-12deg) translateY(-8px);
    }
}

/* Responsive adjustments for sticker */
@media (max-width: 1200px) {
    .hero-visual .sticker-button {
        top: -200px !important;
        left: -160px !important;
        width: 100px !important;
        height: 100px !important;
    }
    
    .hero-visual .sticker-text {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 768px) {
    .hero-visual .sticker-button {
        top: -160px !important;
        left: -120px !important;
        width: 80px !important;
        height: 80px !important;
        transform: rotate(-15deg) !important;
    }
    
    .hero-visual .sticker-text {
        font-size: 0.8rem !important;
        letter-spacing: 0.3px !important;
    }
    
    .hero-visual .sticker-button:hover {
        transform: rotate(-12deg) scale(1.05) !important;
    }
}

@media (max-width: 480px) {
    .hero-visual .sticker-button {
        top: -120px !important;
        left: -80px !important;
        width: 70px !important;
        height: 70px !important;
    }
    
    .hero-visual .sticker-text {
        font-size: 0.7rem !important;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .sticker-button {
        animation: none;
    }
    
    .sticker-button:hover {
        transform: rotate(-8deg) scale(1.05);
    }
    
    .sticker-shine {
        display: none;
    }
}