/* Hero Section Styles - Mobile First Approach */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero {
        animation: none;
        background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    }
    
    .logo img,
    .pulse-bg,
    .circle-button,
    .hero-shape {
        animation: none !important;
        transition: none !important;
    }
}

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

/* Animated Background Shapes */
.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-shape {
    position: absolute;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 12s infinite ease-in-out;
    will-change: transform;
}

.hero-shape-1 {
    background: rgba(255, 0, 0, 0.3);
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
}

.hero-shape-2 {
    background: rgba(0, 0, 255, 0.3);
    width: 250px;
    height: 250px;
    bottom: -125px;
    right: -125px;
}

@keyframes float {
    0% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    50% { 
        transform: translate(50px, 50px) rotate(180deg);
        opacity: 0.5;
    }
    100% { 
        transform: translate(0, 0) rotate(360deg);
        opacity: 0.3;
    }
}

/* Logo Styles - Mobile First */
.logo {
    position: absolute;
    opacity: 0;
    z-index: 3;
    text-align: center;
    transition: opacity 2s ease-in-out;
    perspective: 1000px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Prevent logo from interfering with button positioning */
}

.logo img {
    max-width: min(200px, 45vw);
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    animation: logo-pulse 3s ease-in-out infinite alternate;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    will-change: transform, filter;
}

/* Touch device optimization */
@media (hover: hover) {
    .logo img:hover {
        filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.8));
        transform: scale(1.05);
    }
}

.pulse-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(220px, 48vw);
    height: min(220px, 48vw);
    background: radial-gradient(circle, rgba(255,0,0,0.6) 0%, rgba(255,0,0,0) 70%);
    border-radius: 50%;
    z-index: 2;
    animation: pulse-red 2s infinite ease-in-out;
    will-change: transform, opacity;
    pointer-events: none; /* Ensure pulse background doesn't interfere */
}

@keyframes pulse-red {
    0% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 0.6; 
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1); 
        opacity: 0.3; 
    }
    100% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 0.6; 
    }
}

@keyframes logo-pulse {
    0% {
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    }
    100% {
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.6));
    }
}

/* Star Container Styles - Mobile First */
.star-container {
    position: absolute;
    width: min(300px, 85vw);
    height: min(300px, 85vw);
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 4;
    top: 45%; /* Adjusted to account for bottom labels */
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Allow clicks to pass through to buttons */
}

.button-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Allow clicks to pass through to individual buttons */
}

/* Button Styles - Mobile First */
.circle-button {
    position: absolute;
    width: clamp(45px, 12.5vw, 62px);
    height: clamp(45px, 12.5vw, 62px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(var(--blur-effect, 10px));
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0);
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 5;
    text-decoration: none !important;
    color: inherit;
    border: none;
    outline: none;
    will-change: transform, opacity;
    pointer-events: auto; /* Re-enable pointer events for buttons */
}

.circle-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.circle-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(231, 60, 126, 0.5);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: opacity, transform;
}

/* Hover effects only for devices that support hover */
@media (hover: hover) {
    .circle-button:hover {
        background: rgba(255, 255, 255, 0.2);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        text-decoration: none !important;
    }
    
    .circle-button:hover .circle-button-inner {
        transform: scale(1.1);
    }

    .circle-button:hover::after {
        opacity: 1;
        animation: pulse-button 2s infinite;
    }
}

/* Touch device interactions */
@media (hover: none) {
    .circle-button:active {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .circle-button:active .circle-button-inner {
        transform: scale(0.95);
    }
}

@keyframes pulse-button {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.circle-button-inner {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.circle-button i {
    color: #fff;
    font-size: clamp(20px, 5.47vw, 30px);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Button label styles */
.circle-button .button-label {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 1;
    transform: translateX(-50%);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    top: 120%;
    left: 50%;
}

/* Hide labels on desktop and show on hover */
@media (hover: hover) and (min-width: 1024px) {
    .circle-button .button-label {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    
    .circle-button:hover .button-label {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Always show labels on touch devices and smaller screens */
@media (hover: none), (max-width: 1023px) {
    .circle-button .button-label {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
        font-weight: 500;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Enhance labels for very small screens */
@media (max-width: 480px) {
    .circle-button .button-label {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
}

/* Improve label visibility on mobile landscape */
@media (max-height: 600px) and (orientation: landscape) {
    .circle-button .button-label {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .hero-shape-1 {
        width: 400px;
        height: 400px;
        top: -200px;
        left: -200px;
    }

    .hero-shape-2 {
        width: 350px;
        height: 350px;
        bottom: -175px;
        right: -175px;
    }

    .logo img {
        max-width: min(250px, 35vw);
    }

    .pulse-bg {
        width: min(270px, 38vw);
        height: min(270px, 38vw);
    }

    .star-container {
        width: min(350px, 80vw);
        height: min(350px, 80vw);
        top: 47%; /* Slightly adjusted for larger screens */
    }

    .circle-button {
        width: clamp(50px, 11.25vw, 69px);
        height: clamp(50px, 11.25vw, 69px);
    }

    .circle-button i {
        font-size: clamp(22px, 3.9vw, 32px);
    }

    .circle-button .button-label {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Desktop and larger screens */
@media (min-width: 1024px) {
    .hero-shape {
        filter: blur(80px);
        opacity: 0.5;
    }

    .hero-shape-1 {
        width: 500px;
        height: 500px;
        top: -250px;
        left: -250px;
    }

    .hero-shape-2 {
        width: 400px;
        height: 400px;
        bottom: -200px;
        right: -200px;
    }

    .star-container {
        width: min(400px, 45vw);
        height: min(400px, 45vw);
        top: 48%; /* Adjusted for desktop to account for labels */
    }

    .circle-button {
        width: clamp(44px, 8.75vw, 69px);
        height: clamp(44px, 8.75vw, 69px);
    }

    .circle-button i {
        font-size: clamp(18px, 3.125vw, 26px);
    }
}

/* Landscape orientation optimizations */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 500px;
    }

    .logo img {
        max-width: min(180px, 30vw);
    }

    .pulse-bg {
        width: min(200px, 33vw);
        height: min(200px, 33vw);
    }

    .star-container {
        width: min(280px, 75vw);
        height: min(280px, 75vw);
        top: 40%; /* More conservative positioning for landscape */
    }

    .circle-button {
        width: clamp(40px, 7.5vw, 56px);
        height: clamp(40px, 7.5vw, 56px);
    }

    .circle-button i {
        font-size: clamp(16px, 3.5vw, 24px);
    }
}

/* Remove any unwanted text decorations */
.circle-button,
.circle-button:hover,
.circle-button:focus,
.circle-button:active,
.circle-button:visited {
    text-decoration: none !important;
    color: inherit;
}
