/* --- OPTIMIZED UNIVERSAL STYLES & RESETS --- */
/* Updated: 2024-12-19 - Added gradient colors for sun and orbits */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Enable hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a23 0%, #1a1a4a 50%, #2d1b69 100%);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    display: block;
    /* Performance optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* --- MAIN SOLAR SYSTEM & LOGIN SECTION --- */
.main-content-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
}

.solar-system-container {
    width: 85%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-section {
    width: 25%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- SOLAR SYSTEM STYLES --- */
.brand-text {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    z-index: 100;
    text-align: center;
}

.saifs {
    color: #00d4ff;
    font-weight: 700;
}

.stars-background {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(2px 2px at 20px 30px, #eee, transparent),
                radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
                radial-gradient(1px 1px at 90px 40px, #fff, transparent),
                radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
                radial-gradient(2px 2px at 160px 30px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: twinkle 4s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.solar-system-container .sun {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, #ffd700 0%, #ff6b35 50%, #00c4cc 100%) !important;
    border-radius: 50%;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px rgba(255, 107, 53, 0.6) !important;
    animation: sunPulse 3s ease-in-out infinite;
    z-index: 10;
}

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

.infinity-symbol {
    font-size: clamp(1.2rem, 2.5vw, 2.5rem);
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: infinityGlow 2s ease-in-out infinite alternate;
}

@keyframes infinityGlow {
    0% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); }
    100% { text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.8); }
}

.unlimited-text {
    font-size: clamp(0.35rem, 0.6vw, 0.6rem);
    color: white;
    font-weight: bold;
    text-align: center;
    margin-top: clamp(1px, 0.5vw, 5px);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.platforms-orbit {
    position: absolute;
    width: 280px;
    height: 280px;
    border: 2px solid;
    border-color: #ffd700 #ff6b35 #00c4cc #ffd700;
    border-radius: 50%;
    animation: rotate 35s linear infinite;
    z-index: 5;
    top: 50%;
    left: 50%;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.platform {
    position: absolute;
    width: clamp(30px, 4vw, 60px);
    height: clamp(30px, 4vw, 60px);
    cursor: pointer;
    transition: all 0.3s ease;
    /* Position circles on the orbit line */
    top: 50%;
    left: 50%;
    transform-origin: center;
    transform: translate(-50%, -50%);
}

.platform:hover {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 15;
}

.platform:hover .platform-circle {
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    border: 2px solid rgba(255, 107, 53, 0.6);
}

.platform-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.platform-circle img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    border-radius: 50%;
}

.platform-text {
    position: absolute;
    bottom: clamp(-10px, -1.5vw, -20px);
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: clamp(0.35rem, 0.5vw, 0.6rem);
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Platform positioning now handled dynamically by JavaScript using trigonometry */

.tools-orbit {
    position: absolute;
    width: 520px;
    height: 520px;
    border: 1px solid;
    border-color: #ffd700 #ff6b35 #00c4cc #ffd700;
    border-radius: 50%;
    animation: rotate 30s linear infinite reverse;
    z-index: 3;
    top: 50%;
    left: 50%;
}

/* Counter-rotate platforms to keep them upright while orbiting */
@keyframes counterRotateCanva {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

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

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

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

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

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

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

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

/* Counter-rotate AI tools to keep them upright while orbiting */
.tools-orbit .ai-tool {
    animation: counterRotateTools 30s linear infinite;
}

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

/* AI Tool circles styling */
.ai-tool {
    position: absolute;
    width: clamp(30px, 4vw, 60px) !important;
    height: clamp(30px, 4vw, 60px) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    top: 50%;
    left: 50%;
    transform-origin: center;
    transform: translate(-50%, -50%);
}

.ai-tool .platform-circle {
    width: 100%;
    height: 100%;
}

.ai-tool .platform-circle img {
    width: 65%;
    height: 65%;
}

.ai-tool .platform-text {
    font-size: clamp(0.3rem, 0.4vw, 0.5rem);
    bottom: clamp(-12px, -1.2vw, -18px);
}

.ai-tool:hover {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 15;
}

.ai-tool:hover .platform-circle {
    box-shadow: 0 8px 25px rgba(0, 196, 204, 0.4);
    border: 2px solid rgba(0, 196, 204, 0.6);
}

.price-line {
    position: absolute;
    width: clamp(300px, 50vw, 600px);
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffd700, #ff6b35, #00c4cc, transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.ai-tools-section {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 8;
}

.ai-tools-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.ai-tools-subtitle {
    color: #00d4ff;
    font-size: 0.9rem;
    font-weight: 500;
}

.center-price-comparison {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 8;
}

.our-price {
    color: #00d4ff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.competitor-price {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
}

.price-comparison {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 8;
}

.extra-credits-section {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 8;
}

.extra-credits-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.extra-credits-highlight {
    color: #00d4ff;
    font-size: 0.9rem;
    font-weight: 600;
}

.tooltip {
    position: absolute;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(26, 26, 58, 0.95) 100%);
    color: white;
    padding: clamp(8px, 1vw, 10px) clamp(12px, 1.5vw, 14px);
    border-radius: 8px;
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    font-weight: 500;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 1px solid rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    max-width: clamp(150px, 20vw, 200px);
    text-align: center;
}

.tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.tooltip strong {
    color: #ffd700;
    font-weight: 600;
}

/* Modern Responsive Design with CSS Grid and Flexbox */

/* Container responsive sizing */
.solar-system-container {
    width: clamp(300px, 85vw, 100%);
    height: clamp(300px, 85vh, 100%);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: clamp(10px, 2vw, 20px);
}

/* Responsive breakpoints for specific device optimizations */

/* Large screens (4K displays, large desktops) */
@media (min-width: 1920px) {
    .solar-system-container {
        width: 90%;
        height: 90vh;
    }

    .platforms-orbit {
        width: 280px;
        height: 280px;
    }

    .tools-orbit {
        width: 520px;
        height: 520px;
    }

    .sun {
        width: 100px;
        height: 100px;
    }

    .infinity-symbol {
        font-size: 3rem;
    }

    .unlimited-text {
        font-size: 0.8rem;
    }
}

/* Desktop and laptop screens */
@media (min-width: 1200px) and (max-width: 1919px) {
    .solar-system-container {
        width: 85%;
        height: 85vh;
    }
}

/* Tablet landscape and small desktop */
@media (min-width: 992px) and (max-width: 1199px) {
    .solar-system-container {
        width: 80%;
        height: 80vh;
    }

    .platforms-orbit {
        width: 280px;
        height: 280px;
    }

    .tools-orbit {
        width: 440px;
        height: 440px;
    }

    .sun {
        width: 100px;
        height: 100px;
    }

    .infinity-symbol {
        font-size: 2.5rem;
    }

    .unlimited-text {
        font-size: 0.6rem;
    }

    .platform {
        width: 50px;
        height: 50px;
    }

    .platform-text {
        font-size: 0.7rem;
    }

    .ai-tool {
        width: 45px;
        height: 45px;
    }

    .ai-tool .platform-text {
        font-size: 0.6rem;
    }

    .platform-circle {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .platform-circle img {
        width: 70%;
        height: 70%;
        object-fit: contain;
        border-radius: 50%;
    }

    /* Show most tools on tablet landscape */
    .ai-tool:nth-child(n+12) {
        display: none;
    }
}

/* Tablet portrait */
@media (min-width: 768px) and (max-width: 991px) {
    .solar-system-container {
        width: 75%;
        height: 75vh;
    }

    .platforms-orbit {
        width: 220px;
        height: 220px;
    }

    .tools-orbit {
        width: 380px;
        height: 380px;
    }

    .sun {
        width: 80px;
        height: 80px;
    }

    .infinity-symbol {
        font-size: 2rem;
    }

    .unlimited-text {
        font-size: 0.5rem;
    }

    .platform {
        width: 40px;
        height: 40px;
    }

    .platform-text {
        font-size: 0.6rem;
    }

    .ai-tool {
        width: 40px;
        height: 40px;
    }

    .ai-tool .platform-text {
        font-size: 0.5rem;
    }

    .platform-circle {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    }

    .platform-circle img {
        width: 70%;
        height: 70%;
        object-fit: contain;
        border-radius: 50%;
    }

    /* Show fewer tools on tablet portrait */
    .ai-tool:nth-child(n+11) {
        display: none;
    }
}

/* Mobile landscape and small tablets */
@media (min-width: 576px) and (max-width: 767px) {
    .solar-system-container {
        width: 70%;
        height: 70vh;
    }

    .platforms-orbit {
        width: 180px;
        height: 180px;
    }

    .tools-orbit {
        width: 320px;
        height: 320px;
    }

    .sun {
        width: 60px;
        height: 60px;
    }

    .infinity-symbol {
        font-size: 1.5rem;
    }

    .unlimited-text {
        font-size: 0.4rem;
    }

    /* Show fewer tools on small screens */
    .ai-tool:nth-child(n+10) {
        display: none;
    }
}

/* Mobile portrait (iPhone SE, iPhone 14 Pro, Pixel) */
@media (max-width: 575px) {
    .solar-system-container {
        width: 90%;
        height: 60vh;
        padding: 15px;
    }

    .platforms-orbit {
        width: 125px;
        height: 125px;
    }

    .tools-orbit {
        width: 175px;
        height: 175px;
    }

    .sun {
        width: 55px !important;
        height: 55px !important;
    }

    .infinity-symbol {
        font-size: 1.2rem;
    }

    .unlimited-text {
        font-size: 0.35rem;
        margin-top: 1px;
    }

    .platform {
        width: 30px;
        height: 30px;
    }

    .platform-text {
        font-size: 0.35rem;
        bottom: -10px;
    }

    .ai-tool {
        width: 30px !important;
        height: 30px !important;
    }

    .ai-tool .platform-text {
        font-size: 0.3rem;
        bottom: -8px;
    }

    .tooltip {
        font-size: 0.6rem;
        padding: 6px 10px;
        max-width: 120px;
    }

    /* Hide some tools on very small screens to prevent overcrowding */
    .ai-tool:nth-child(n+9) {
        display: none;
    }

    /* Adjust text sizes for better readability */
    .ai-tools-title {
        font-size: 1rem;
    }

    .ai-tools-subtitle {
        font-size: 0.8rem;
    }

    .our-price {
        font-size: 0.9rem;
    }

    .competitor-price {
        font-size: 1rem;
    }

    .extra-credits-text {
        font-size: 0.7rem;
    }

    .extra-credits-highlight {
        font-size: 0.8rem;
    }
}

/* Ultra-wide screens */
@media (min-width: 2560px) {
    .solar-system-container {
        width: 80%;
        height: 80vh;
    }

    .platforms-orbit {
        width: 280px;
        height: 280px;
    }

    .tools-orbit {
        width: 520px;
        height: 520px;
    }

    .sun {
        width: 100px;
        height: 100px;
    }

    .infinity-symbol {
        font-size: 3.5rem;
    }

    .unlimited-text {
        font-size: 0.9rem;
    }
}

/* High DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .platform-circle img,
    .ai-tool .platform-circle img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .platforms-orbit,
    .tools-orbit,
    .sun,
    .infinity-symbol {
        animation: none !important;
    }

    .platform:hover,
    .ai-tool:hover {
        transform: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .tooltip {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.98) 0%, rgba(26, 26, 58, 0.98) 100%);
        border: 1px solid rgba(255, 107, 53, 0.4);
    }
}

/* Orbit Circle: Always visible on ALL devices - Override any hiding rules */
    #solar-system-column,
    #solar-system {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Responsive container that works on all devices */
.solar-system-container {
    width: min(90vw, 90vh, 600px);
    height: min(90vw, 90vh, 600px);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: clamp(10px, 2vw, 20px);
    aspect-ratio: 1;
}

/* Device-specific optimizations for perfect display */

/* iPhone SE (375px) */
@media (max-width: 375px) {
    .solar-system-container {
        width: min(85vw, 85vh, 350px);
        height: min(85vw, 85vh, 350px);
    }

    .platforms-orbit {
        width: 120px;
        height: 120px;
    }

    .tools-orbit {
        width: 180px;
        height: 180px;
    }

    .sun {
        width: 65px !important;
        height: 65px !important;
    }

    .platform {
        width: 25px;
        height: 25px;
    }

    .ai-tool {
        width: 25px !important;
        height: 25px !important;
    }

    /* Show even fewer tools on very small screens */
    .ai-tool:nth-child(n+7) {
        display: none;
    }

    /* Hide some platform text to save space */
    .platform-text {
        display: none;
    }

    .ai-tool .platform-text {
        display: none;
    }
}

/* iPhone XR, iPhone 12 Pro, iPhone 14 Pro Max (414px-430px) */
@media (min-width: 376px) and (max-width: 430px) {
    .solar-system-container {
        width: min(88vw, 88vh, 400px);
        height: min(88vw, 88vh, 400px);
    }

    .platforms-orbit {
        width: 140px;
        height: 140px;
    }

    .tools-orbit {
        width: 240px;
        height: 240px;
    }

    .sun {
        width: 45px;
        height: 45px;
    }

    .platform {
        width: 28px;
        height: 28px;
    }

    .ai-tool {
        width: 28px !important;
        height: 28px !important;
    }

    .platform-text {
        font-size: 0.4rem;
    }

    .ai-tool .platform-text {
        font-size: 0.35rem;
    }
}

/* Pixel 7 (412px) */
@media (min-width: 411px) and (max-width: 413px) {
    .solar-system-container {
        width: min(87vw, 87vh, 390px);
        height: min(87vw, 87vh, 390px);
    }
}

/* Samsung Galaxy S8+, S20 Ultra, A51/71 (360px-412px) */
@media (min-width: 360px) and (max-width: 412px) {
    .solar-system-container {
        width: min(86vw, 86vh, 380px);
        height: min(86vw, 86vh, 380px);
    }
}

/* Galaxy Z Fold 5 (unfolded) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .solar-system-container {
        width: min(45vw, 45vh, 500px);
        height: min(45vw, 45vh, 500px);
    }
}

/* iPad Mini, iPad Air, iPad Pro */
@media (min-width: 768px) and (max-width: 1024px) {
    .solar-system-container {
        width: min(70vw, 70vh, 550px);
        height: min(70vw, 70vh, 550px);
    }

    .platforms-orbit {
        width: 220px;
        height: 220px;
    }

    .tools-orbit {
        width: 380px;
        height: 380px;
    }

    .sun {
        width: 80px;
        height: 80px;
    }

    .platform {
        width: 45px;
        height: 45px;
    }

    .ai-tool {
        width: 45px !important;
        height: 45px !important;
    }
}

/* Surface Pro 7, Surface Duo */
@media (min-width: 912px) and (max-width: 1280px) {
    .solar-system-container {
        width: min(65vw, 65vh, 580px);
        height: min(65vw, 65vh, 580px);
    }
}

/* Asus Zenbook Fold */
@media (min-width: 1024px) and (max-width: 1440px) {
    .solar-system-container {
        width: min(60vw, 60vh, 600px);
        height: min(60vw, 60vh, 600px);
    }
}

/* Nest Hub, Nest Hub Max */
@media (min-width: 1024px) and (max-width: 1280px) and (orientation: landscape) {
    .solar-system-container {
        width: min(50vw, 50vh, 500px);
        height: min(50vw, 50vh, 500px);
    }
}

/* Large desktop screens */
@media (min-width: 1440px) {
    .solar-system-container {
        width: min(55vw, 55vh, 650px);
        height: min(55vw, 55vh, 650px);
    }

    .platforms-orbit {
        width: 280px;
        height: 280px;
    }

    .tools-orbit {
        width: 520px;
        height: 520px;
    }

    .sun {
        width: 100px;
        height: 100px;
    }

    .platform {
        width: 70px;
        height: 70px;
    }

    .ai-tool {
        width: 70px !important;
        height: 70px !important;
    }
}