/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Selection Text */
::selection {
    background: rgba(147, 51, 234, 0.3);
    color: white;
}

/* Loading Animation */
.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(147, 51, 234, 0.3);
    border-top-color: #9333ea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Typography */
@media (max-width: 768px) {
    .gradient-text {
        font-size: 3rem !important;
    }
}

/* Enhanced Transitions */
.transition-enhanced {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow Effects */
.glow-effect {
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.5),
                0 0 40px rgba(147, 51, 234, 0.3),
                0 0 60px rgba(147, 51, 234, 0.1);
}

/* Text Animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

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

/* Particle Effect */
.particle {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    animation: particleAnimation 3s ease-out forwards;
}

@keyframes particleAnimation {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(1);
    }
}

/* Hover States */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Focus States */
.focus-ring {
    transition: box-shadow 0.3s ease;
}

.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.5);
}

/* Dark Mode Specific */
.dark-mode {
    background-color: #0a0a0a;
    color: #ffffff;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* Twinkling Background Effect */
.twinkling-bg {
    position: relative;
    overflow: hidden;
}

.twinkling-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 20%, white, transparent),
        radial-gradient(2px 2px at 10% 80%, white, transparent);
    background-size: 200% 200%;
    animation: twinkle 8s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}
/* Earth Animation Styles */
.earth-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    perspective: 1000px;
}

.earth-sphere {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: earthRotation 30s linear infinite;
}

.earth-surface {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #4a90e2, #1a5490);
    overflow: hidden;
    box-shadow: 
        inset -30px -30px 40px rgba(0, 0, 0, 0.5),
        inset 10px 10px 30px rgba(255, 255, 255, 0.2);
}

.continent {
    position: absolute;
    background: linear-gradient(135deg, #228b22, #2e7d32);
    border-radius: 50%;
    opacity: 0.8;
}

.continent-1 {
    width: 80px;
    height: 60px;
    top: 30%;
    left: 20%;
    transform: rotate(-20deg);
    box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.3);
}

.continent-2 {
    width: 100px;
    height: 70px;
    top: 45%;
    right: 25%;
    transform: rotate(30deg);
    box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.3);
}

.continent-3 {
    width: 60px;
    height: 80px;
    bottom: 25%;
    left: 35%;
    transform: rotate(45deg);
    box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.3);
}

.continent-4 {
    width: 70px;
    height: 50px;
    top: 20%;
    right: 30%;
    transform: rotate(-10deg);
    box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.3);
}

.cloud-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 50%),
        radial-gradient(circle at 60% 60%, 
        rgba(255, 255, 255, 0.08) 0%, 
        transparent 40%),
        radial-gradient(circle at 20% 70%, 
        rgba(255, 255, 255, 0.06) 0%, 
        transparent 30%);
    animation: cloudMovement 40s linear infinite;
}

.earth-atmosphere {
    position: absolute;
    width: 110%;
    height: 110%;
    top: -5%;
    left: -5%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(135, 206, 235, 0.3) 0%, 
        rgba(135, 206, 235, 0.1) 40%, 
        transparent 70%);
    animation: atmosphereGlow 4s ease-in-out infinite alternate;
}

@keyframes earthRotation {
    from {
        transform: rotateY(0deg) rotateZ(-23.5deg);
    }
    to {
        transform: rotateY(360deg) rotateZ(-23.5deg);
    }
}

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

@keyframes atmosphereGlow {
    from {
        opacity: 0.6;
        filter: blur(2px);
    }
    to {
        opacity: 1;
        filter: blur(3px);
    }
}

/* Earth hover effect */
.hovered-element:hover .earth-sphere {
    animation-duration: 10s;
}

.hovered-element:hover .earth-atmosphere {
    animation-duration: 2s;
    background: radial-gradient(circle at 30% 30%, 
        rgba(135, 206, 235, 0.5) 0%, 
        rgba(135, 206, 235, 0.2) 40%, 
        transparent 70%);
}

/* Responsive Earth */
@media (max-width: 768px) {
    .earth-container {
        width: 200px;
        height: 200px;
    }
    
    .continent-1 { width: 50px; height: 40px; }
    .continent-2 { width: 70px; height: 50px; }
    .continent-3 { width: 40px; height: 50px; }
    .continent-4 { width: 45px; height: 35px; }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        color: black;
        background: white;
    }
    
    .earth-container {
        display: none;
    }
}
