/* ===== PREMIUM INNER PAGE LOADER STYLES ===== */
.premium-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F8FAFC;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Prevent scrolling while loader is active */
body.premium-loader-active {
    overflow: hidden;
    height: 100vh;
}

.premium-loader-container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    position: relative;
}

/* Growth Graph Animation */
.growth-graph {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 2rem auto 3rem;
}

.graph-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.grid-line {
    position: absolute;
    background: rgba(0, 168, 120, 0.05);
}

.grid-line.horizontal {
    width: 100%;
    height: 1px;
    left: 0;
}

.grid-line.horizontal:nth-child(1) { top: 0; }
.grid-line.horizontal:nth-child(2) { top: 50%; transform: translateY(-50%); }
.grid-line.horizontal:nth-child(3) { bottom: 0; }

.grid-line.vertical {
    height: 100%;
    width: 1px;
    top: 0;
}

.grid-line.vertical:nth-child(4) { left: 0; }
.grid-line.vertical:nth-child(5) { left: 25%; }
.grid-line.vertical:nth-child(6) { left: 50%; }
.grid-line.vertical:nth-child(7) { right: 25%; }

.growth-bars {
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 2%;
}

.growth-bar {
    position: relative;
    width: 12%;
    height: 0;
    animation: barRise 2.5s ease-in-out infinite;
    transform-origin: bottom;
}

.bar-1 { animation-delay: 0s; }
.bar-2 { animation-delay: 0.2s; }
.bar-3 { animation-delay: 0.4s; }
.bar-4 { animation-delay: 0.6s; }
.bar-5 { animation-delay: 0.8s; }

.bar-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #00A878, #1E6FD9);
    border-radius: 6px 6px 0 0;
    position: relative;
    overflow: hidden;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
}

.bar-pulse {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 8px;
    background: rgba(30, 111, 217, 0.3);
    border-radius: 4px;
    animation: pulseUp 2.5s ease-in-out infinite;
}

.bar-1 .bar-pulse { animation-delay: 0s; }
.bar-2 .bar-pulse { animation-delay: 0.2s; }
.bar-3 .bar-pulse { animation-delay: 0.4s; }
.bar-4 .bar-pulse { animation-delay: 0.6s; }
.bar-5 .bar-pulse { animation-delay: 0.8s; }

@keyframes barRise {
    0%, 100% {
        height: 20%;
        transform: scaleY(1);
    }
    50% {
        height: 90%;
        transform: scaleY(1.05);
    }
}

@keyframes pulseUp {
    0%, 100% {
        top: 0;
        opacity: 0.3;
    }
    50% {
        top: 90%;
        opacity: 1;
    }
}

.connection-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 168, 120, 0.3) 20%, 
        rgba(30, 111, 217, 0.3) 80%, 
        transparent 100%);
    transform: translateY(-50%);
    animation: lineFlow 3s linear infinite;
}

@keyframes lineFlow {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Segmented Progress Ring */
.progress-ring-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 2rem auto;
}

.segmented-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-background {
    stroke: rgba(0, 168, 120, 0.1);
    fill: none;
}

.ring-segment {
    fill: none;
    stroke: url(#ringGradient);
    stroke-linecap: round;
    stroke-dasharray: 88;
    stroke-dashoffset: 352;
    transform-origin: center;
    opacity: 0;
}

.segment-1 {
    animation: segmentDraw 4s ease-in-out infinite;
    stroke-dasharray: 88;
}

.segment-2 {
    animation: segmentDraw 4s ease-in-out infinite 0.5s;
    stroke-dasharray: 88;
}

.segment-3 {
    animation: segmentDraw 4s ease-in-out infinite 1s;
    stroke-dasharray: 88;
}

.segment-4 {
    animation: segmentDraw 4s ease-in-out infinite 1.5s;
    stroke-dasharray: 88;
}

@keyframes segmentDraw {
    0% {
        stroke-dashoffset: 352;
        opacity: 0;
        transform: rotate(0deg);
    }
    15% {
        opacity: 1;
    }
    35% {
        stroke-dashoffset: 264;
        opacity: 1;
    }
    50% {
        opacity: 0;
        transform: rotate(180deg);
    }
    100% {
        stroke-dashoffset: 352;
        opacity: 0;
        transform: rotate(360deg);
    }
}

/* Geometric Shapes */
.geometric-shapes {
    position: relative;
    margin: 2rem auto;
    height: 80px;
}

.shape-container {
    position: relative;
    width: 200px;
    height: 80px;
    margin: 0 auto;
}

.shape {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: shapeFloat 6s ease-in-out infinite;
}

.shape-square {
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.shape-circle {
    top: 0;
    right: 0;
    animation-delay: 2s;
}

.shape-triangle {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 4s;
}

.shape-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00A878, #1E6FD9);
    position: relative;
}

.shape-square .shape-inner {
    border-radius: 8px;
    transform: rotate(45deg);
    animation: squareRotate 4s linear infinite;
}

.shape-circle .shape-inner {
    border-radius: 50%;
    animation: circlePulse 3s ease-in-out infinite;
}

.shape-triangle .shape-inner {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: triangleBob 5s ease-in-out infinite;
}

@keyframes shapeFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes squareRotate {
    0% {
        transform: rotate(45deg);
    }
    100% {
        transform: rotate(405deg);
    }
}

@keyframes circlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes triangleBob {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-5px) rotate(120deg);
    }
    66% {
        transform: translateY(5px) rotate(240deg);
    }
}

/* Loading Text */
.premium-loader-text {
    text-align: center;
    margin: 2rem 0;
}

.loader-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0A1E3C;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.title-part {
    background: linear-gradient(135deg, #00A878, #1E6FD9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-dots {
    display: flex;
    gap: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00A878;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.loader-subtitle {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 0.9rem;
    color: #5D6D7E;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: subtitleFade 3s ease-in-out infinite;
}

@keyframes subtitleFade {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Progress Indicator */
.premium-progress {
    margin-top: 2rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.progress-container {
    position: relative;
}

.progress-track {
    height: 4px;
    background: rgba(0, 168, 120, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00A878, #1E6FD9);
    border-radius: 2px;
    animation: progressExpand 2s ease-in-out infinite;
}

.progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 20%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    animation: glowMove 2s ease-in-out infinite;
}

@keyframes progressExpand {
    0%, 100% {
        width: 10%;
    }
    50% {
        width: 90%;
    }
}

@keyframes glowMove {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(500%);
    }
    100% {
        transform: translateX(500%);
    }
}

.progress-percentage {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1E6FD9;
    text-align: center;
    margin-top: 0.5rem;
    height: 24px;
}

.percentage-number {
    display: inline-block;
    min-width: 2.5em;
    text-align: right;
}

.percentage-symbol {
    margin-left: 2px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .premium-loader-container {
        padding: 1.5rem;
        max-width: 500px;
    }
    
    .growth-graph {
        height: 160px;
        margin: 1.5rem auto 2rem;
    }
    
    .growth-bar {
        width: 14%;
    }
    
    .progress-ring-wrapper {
        width: 100px;
        height: 100px;
        margin: 1.5rem auto;
    }
    
    .geometric-shapes {
        height: 70px;
        margin: 1.5rem auto;
    }
    
    .shape-container {
        width: 180px;
        height: 70px;
    }
    
    .shape {
        width: 50px;
        height: 50px;
    }
    
    .loader-title {
        font-size: 1.3rem;
    }
    
    .loader-subtitle {
        font-size: 0.8rem;
    }
    
    .premium-progress {
        max-width: 250px;
        margin-top: 1.5rem;
    }
    
    /* Adjust animation speeds for mobile */
    @keyframes barRise {
        0%, 100% {
            height: 15%;
        }
        50% {
            height: 85%;
        }
    }
}

@media (max-width: 480px) {
    .premium-loader-container {
        padding: 1rem;
        max-width: 400px;
    }
    
    .growth-graph {
        height: 120px;
        margin: 1rem auto 1.5rem;
    }
    
    .growth-bar {
        width: 16%;
    }
    
    .bar-fill {
        border-radius: 4px 4px 0 0;
    }
    
    .progress-ring-wrapper {
        width: 80px;
        height: 80px;
        margin: 1rem auto;
    }
    
    .geometric-shapes {
        height: 60px;
        margin: 1rem auto;
    }
    
    .shape-container {
        width: 160px;
        height: 60px;
    }
    
    .shape {
        width: 40px;
        height: 40px;
    }
    
    .loader-title {
        font-size: 1.1rem;
        gap: 6px;
    }
    
    .dot {
        width: 4px;
        height: 4px;
    }
    
    .loader-subtitle {
        font-size: 0.75rem;
    }
    
    .premium-progress {
        max-width: 200px;
        margin-top: 1rem;
    }
    
    .progress-percentage {
        font-size: 0.75rem;
    }
    
    /* Adjust animation for small screens */
    @keyframes barRise {
        0%, 100% {
            height: 10%;
        }
        50% {
            height: 80%;
        }
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .premium-loader-container {
        max-width: 700px;
        padding: 3rem;
    }
    
    .growth-graph {
        height: 250px;
        margin: 3rem auto 4rem;
    }
    
    .growth-bar {
        width: 10%;
    }
    
    .progress-ring-wrapper {
        width: 140px;
        height: 140px;
        margin: 3rem auto;
    }
    
    .geometric-shapes {
        height: 100px;
        margin: 3rem auto;
    }
    
    .shape-container {
        width: 240px;
        height: 100px;
    }
    
    .shape {
        width: 70px;
        height: 70px;
    }
    
    .loader-title {
        font-size: 1.8rem;
    }
    
    .loader-subtitle {
        font-size: 1rem;
    }
    
    .premium-progress {
        max-width: 350px;
        margin-top: 3rem;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .growth-bar,
    .bar-pulse,
    .connection-line,
    .ring-segment,
    .shape,
    .shape-inner,
    .dot,
    .loader-subtitle,
    .progress-fill,
    .progress-glow {
        animation: none !important;
    }
    
    .growth-bar {
        height: 50% !important;
        transform: scaleY(1) !important;
    }
    
    .bar-fill::after {
        display: none;
    }
    
    .ring-segment {
        stroke-dashoffset: 0;
        opacity: 0.3;
        transform: rotate(0deg);
    }
    
    .shape {
        transform: translateY(0) scale(1);
    }
    
    .shape-square .shape-inner {
        transform: rotate(45deg);
    }
    
    .dot {
        opacity: 0.3;
    }
    
    .progress-fill {
        width: 50%;
        animation: none;
    }
    
    .progress-glow {
        display: none;
    }
    
    .premium-loader.loaded {
        transition: opacity 0.3s ease;
    }
}

/* Print styles */
@media print {
    .premium-loader {
        display: none !important;
    }
}