/* Foundation Login Style - Inspired by STAG Foundation */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    overflow-x: hidden;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%) !important;
    color: #e8e8e8;
}

/* Override any animated/dotted backgrounds */
.dotted-background {
    display: none !important;
}

/* Ensure solid background for any background elements */
* {
    background-image: none !important;
}

/* Main Container */
.main-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Foundation Login Container */
.foundation-login {
    width: 100%;
    max-width: 420px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

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

/* Foundation Title */
.foundation-title {
    margin-bottom: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.foundation-logo {
    max-width: 280px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.1) drop-shadow(0 4px 12px rgba(0,0,0,0.4));
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    animation: fadeInScale 0.8s ease-out 0.1s forwards;
    transition: all 0.3s ease;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

.foundation-logo:hover {
    transform: translateY(0) scale(1.02);
    filter: brightness(1.3) contrast(1.15) drop-shadow(0 6px 16px rgba(255,255,255,0.1));
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Elegant Form */
.elegant-form {
    width: 100%;
}

/* Input Groups */
.elegant-input-group {
    position: relative;
    margin-bottom: 2.5rem;
    text-align: left;
}

.elegant-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(192, 192, 192, 0.4);
    padding: 1rem 0 0.5rem 0;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: #e8e8e8;
    outline: none;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.elegant-input:focus {
    border-bottom-color: rgba(255, 255, 255, 0.8);
    color: #f5f5f5;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.elegant-input:focus + .elegant-label,
.elegant-input-group.has-value .elegant-label {
    transform: translateY(-1.5rem) scale(0.85);
    color: rgba(220, 220, 220, 0.8);
    font-weight: 400;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
}

.elegant-input-group.focused .elegant-underline {
    width: 100%;
}

.elegant-label {
    position: absolute;
    top: 1rem;
    left: 0;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: rgba(180, 180, 180, 0.7);
    pointer-events: none;
    transition: all 0.3s ease;
    transform-origin: left center;
    letter-spacing: 0.02em;
}

.elegant-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    width: 0;
    background: linear-gradient(90deg, 
        rgba(220, 220, 220, 0.9) 0%, 
        rgba(255, 255, 255, 0.8) 50%, 
        rgba(220, 220, 220, 0.9) 100%);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Error Message */
.error-message {
    margin: 1rem 0;
    padding: 0.75rem 0;
    color: rgba(255, 120, 120, 0.9);
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Enter Button */
.elegant-enter-btn {
    width: 200px;
    height: 50px;
    background: linear-gradient(145deg, 
        rgba(60, 60, 60, 0.8) 0%, 
        rgba(40, 40, 40, 0.9) 50%, 
        rgba(20, 20, 20, 0.8) 100%);
    border: 1px solid rgba(192, 192, 192, 0.4);
    color: #e8e8e8;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    margin: 2rem auto 0;
    display: block;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.elegant-enter-btn:hover:not(:disabled) {
    border-color: rgba(220, 220, 220, 0.6);
    background: linear-gradient(145deg, 
        rgba(80, 80, 80, 0.9) 0%, 
        rgba(60, 60, 60, 0.95) 50%, 
        rgba(40, 40, 40, 0.9) 100%);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
    color: #f5f5f5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 8px rgba(255, 255, 255, 0.1);
}

.elegant-enter-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.elegant-enter-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(40, 40, 40, 0.5);
}

.elegant-enter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.15), 
        transparent);
    transition: left 0.5s ease;
}

.elegant-enter-btn:hover::before {
    left: 100%;
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* Loading Animation */
.lds-ring {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 40px;
    margin: 1rem auto;
}

.lds-ring.hidden {
    display: none;
}

.lds-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 32px;
    height: 32px;
    margin: 4px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: rgba(255, 255, 255, 0.3) transparent transparent transparent;
}

.lds-ring div:nth-child(1) {
    animation-delay: -0.45s;
}

.lds-ring div:nth-child(2) {
    animation-delay: -0.3s;
}

.lds-ring div:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .foundation-name .the-text {
        font-size: 2rem;
    }
    
    .foundation-name .main-name {
        font-size: 3rem;
    }
    
    .foundation-name .foundation-text {
        font-size: 1.2rem;
        letter-spacing: 0.2em;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    .foundation-title {
        margin-bottom: 3rem;
    }
    
    .elegant-enter-btn {
        width: 180px;
        height: 45px;
        font-size: 0.8rem;
    }
}

/* Hide default angular cloak */
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
    display: none !important;
}

/* Subtle animations for enhanced experience */
.elegant-input-group {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.elegant-input-group:nth-child(1) {
    animation-delay: 0.4s;
}

.elegant-input-group:nth-child(2) {
    animation-delay: 0.5s;
}

.elegant-enter-btn {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease-out 0.6s forwards;
}