/* FCSHOLDIX EMS Index Interface Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Fira+Code:wght@400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    /* Inheriting FCSHOLDIX theme colors */
    background: linear-gradient(135deg, #451a03 0%, #290f02 50%, #92400e 100%);
    overflow: hidden;
    height: 100vh;
    position: relative;
}

.background-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    /* FCS Orange and Brown tint overlay */
    background: 
        radial-gradient(circle at 20% 20%, rgba(234, 88, 12, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(146, 64, 14, 0.1) 0%, transparent 50%);
    animation: subtle-shift 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes subtle-shift {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.grid-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 2;
}

.loader-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    padding: 20px;
}

.logo-container {
    width: 80px;
    height: 80px;
    margin-bottom: 30px;
    border-radius: 16px;
    /* FCSHOLDIX Gradient */
    background: linear-gradient(135deg, #ea580c, #92400e);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.3);
    animation: gentle-pulse 3s ease-in-out infinite;
}

.logo-container::before {
    content: 'F';
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: white;
}

@keyframes gentle-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(234, 88, 12, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 15px 40px rgba(234, 88, 12, 0.4); }
}

.spinner-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 30px auto;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    /* FCSHOLDIX Dark Orange */
    border-top: 3px solid #ea580c;
    border-radius: 50%;
    animation: professional-spin 1.5s linear infinite;
}

.spinner-inner {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 90px;
    height: 90px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    /* FCSHOLDIX Light Orange */
    border-right: 2px solid #fed7aa;
    border-radius: 50%;
    animation: professional-spin 2s linear infinite reverse;
}

@keyframes professional-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.company-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.system-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

.progress-section {
    width: 100%;
    max-width: 400px;
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    /* FCSHOLDIX gradient */
    background: linear-gradient(90deg, #ea580c, #fed7aa);
    border-radius: 4px;
    width: 0;
    animation: smooth-progress 6s ease-out forwards;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shimmer 2s infinite;
}

@keyframes smooth-progress {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.percentage-display {
    font-family: 'Fira Code', monospace;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 500;
    color: #ea580c;
    margin-bottom: 8px;
}

.status-message {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    min-height: 1.5em;
    transition: all 0.3s ease;
}

.decoration-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(234, 88, 12, 0.4);
    border-radius: 50%;
    animation: float-dot 6s ease-in-out infinite;
}

.dot:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.dot:nth-child(2) { top: 20%; right: 15%; animation-delay: 1s; }
.dot:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 2s; }
.dot:nth-child(4) { bottom: 15%; right: 10%; animation-delay: 3s; }
.dot:nth-child(5) { top: 50%; left: 5%; animation-delay: 4s; }
.dot:nth-child(6) { top: 70%; right: 8%; animation-delay: 5s; }

@keyframes float-dot {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.4; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 0.8; }
}

.footer-text {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.loader-container:hover .logo-container {
    transform: scale(1.05);
}

.progress-bar:hover .progress-fill {
    filter: brightness(1.1);
}

/* Scalability updates */
@media (min-width: 1600px) {
    .spinner-container { width: 150px; height: 150px; }
    .logo-container { width: 100px; height: 100px; margin-bottom: 40px; }
    .logo-container::before { font-size: 40px; }
    .progress-section { max-width: 500px; }
    .progress-bar { height: 12px; }
}

@media (max-width: 768px) {
    .spinner-container { width: 100px; height: 100px; }
    .logo-container { width: 70px; height: 70px; }
    .logo-container::before { font-size: 28px; }
    .progress-section { max-width: 320px; }
}

@media (max-width: 480px) {
    .loader-container { padding: 15px; }
    .spinner-container { width: 80px; height: 80px; }
    .logo-container { width: 60px; height: 60px; margin-bottom: 20px; }
    .logo-container::before { font-size: 24px; }
    .progress-section { max-width: 280px; margin: 20px 0; }
    .progress-bar { height: 6px; }
}

@media (max-width: 320px) {
    .spinner-container { width: 60px; height: 60px; }
    .logo-container { width: 45px; height: 45px; margin-bottom: 15px; }
    .logo-container::before { font-size: 18px; }
    .progress-section { max-width: 220px; margin: 15px 0; }
    .footer-text { font-size: 0.75rem; bottom: 15px; }
}