@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

html, body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%, #f8fafc 100%);
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 80px; /* Add padding for fixed navbar */
}

/* Tarot theme body override */
.tarot-theme body,
body:has(.tarot-theme) {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0d1a 25%, #2d1b2d 50%, #1a0d1a 75%, #0a0a0a 100%) !important;
    color: #f5f5dc;
}

/* Alternative approach using CSS custom properties */
:root {
    --body-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%, #f8fafc 100%);
    --body-color: #2d3748;
}

/* When tarot theme is active */
.tarot-theme {
    --body-bg: linear-gradient(135deg, #0a0a0a 0%, #1a0d1a 25%, #2d1b2d 50%, #1a0d1a 75%, #0a0a0a 100%);
    --body-color: #f5f5dc;
}

/* Apply the CSS custom properties */
body {
    background: var(--body-bg, linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%, #f8fafc 100%)) !important;
    color: var(--body-color, #2d3748);
}

/* Specific body classes for theme switching */
body.tarot-body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0d1a 25%, #2d1b2d 50%, #1a0d1a 75%, #0a0a0a 100%) !important;
    color: #f5f5dc !important;
}

body.normal-body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%, #f8fafc 100%) !important;
    color: #2d3748 !important;
}

/* GLOBAL NAVBAR ANTI-TRANSPARENCY OVERRIDE - ONLY MAIN CONTAINER */
nav.navbar,
.navbar.modern-navbar,
.modern-navbar,
.navbar-nav .dropdown-menu {
    background-color: #ffffff !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    background-image: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    transition: none !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

/* Ensure navbar children don't inherit gradient */
.navbar .nav-link,
.navbar .nav-item,
.navbar .navbar-nav,
.navbar .navbar-brand {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
}

a, .btn-link {
    color: #9C97CC;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover, .btn-link:hover {
    color: #78CAAB;
    text-decoration: none;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #F9B298, #9C97CC);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 178, 152, 0.25);
    letter-spacing: 0.025em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 178, 152, 0.4);
    background: linear-gradient(135deg, #78CAAB, #E5EB83);
}

/* All button base styles */
.btn {
    border-radius: 12px !important;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    letter-spacing: 0.025em;
    border: none;
}

.btn-secondary {
    color: #fff;
    background: linear-gradient(135deg, #9C97CC, #78CAAB);
    box-shadow: 0 4px 15px rgba(156, 151, 204, 0.25);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(156, 151, 204, 0.4);
    background: linear-gradient(135deg, #78CAAB, #9BE3CC);
}

.btn-success {
    color: #fff;
    background: linear-gradient(135deg, #78CAAB, #9BE3CC);
    box-shadow: 0 4px 15px rgba(120, 202, 171, 0.25);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(120, 202, 171, 0.4);
    background: linear-gradient(135deg, #9BE3CC, #E5EB83);
}

.btn-warning {
    color: #2d3748;
    background: linear-gradient(135deg, #E5EB83, #F9B298);
    box-shadow: 0 4px 15px rgba(229, 235, 131, 0.25);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 235, 131, 0.4);
    background: linear-gradient(135deg, #F9B298, #9C97CC);
    color: #fff;
}

.btn-outline-primary {
    color: #9C97CC;
    background: transparent;
    border: 2px solid #9C97CC;
}

.btn-outline-primary:hover {
    color: #fff;
    background: linear-gradient(135deg, #9C97CC, #78CAAB);
    border-color: #9C97CC;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(156, 151, 204, 0.4);
}

.btn-outline-secondary {
    color: #78CAAB;
    background: transparent;
    border: 2px solid #78CAAB;
}

.btn-outline-secondary:hover {
    color: #fff;
    background: linear-gradient(135deg, #78CAAB, #9BE3CC);
    border-color: #78CAAB;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(120, 202, 171, 0.4);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #78CAAB;
}

.content {
    padding: 1.5rem;
    max-width: 100%;
    margin: 0 auto;
}

/* Modern card styling */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.1);
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Better typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
}

h1 { font-weight: 700; }
h2 { font-weight: 600; }
h3, h4 { font-weight: 600; }
h5, h6 { font-weight: 500; }

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Better form styling */
.form-control {
    border: 2px solid rgba(124, 58, 237, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.95);
    font-family: 'Poppins', sans-serif;
}

.form-control:focus {
    border-color: #78CAAB;
    box-shadow: 0 0 0 0.2rem rgba(120, 202, 171, 0.25);
    background: #fff;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #78CAAB;
}

.invalid {
    outline: 1px solid #F9B298;
}

.validation-message {
    color: #F9B298;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0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NjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #9BE3CC;
}

/* Custom Blazor Reconnection Modal Styles */
.components-reconnect-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
}

.components-reconnect-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

.components-reconnect-dialog {
    position: relative;
    max-width: 400px;
    margin: 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
}

.components-reconnect-content {
    padding: 2rem;
    text-align: center;
}

.components-reconnect-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.components-reconnect-title {
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.components-reconnect-text {
    color: #718096;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.components-reconnect-spinner {
    margin-bottom: 1rem;
}

#components-reconnect-refresh {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Body class when disconnected */
body.blazor-disconnected {
    pointer-events: none;
}

body.blazor-disconnected .components-reconnect-modal {
    pointer-events: all;
}

/* Hide default Blazor reconnection UI */
#components-reconnect-modal.components-reconnect-show,
.components-reconnect-show,
#components-reconnect-modal[style*="display: block"],
#blazor-error-ui {
    display: none !important;
}

/* Responsive design */
@media (max-width: 480px) {
    .components-reconnect-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .components-reconnect-content {
        padding: 1.5rem;
    }
    
    .components-reconnect-icon {
        font-size: 2.5rem;
    }
    
    .components-reconnect-title {
        font-size: 1.1rem;
    }
}
