/* Global Styles */
:root {
    --navy: #1B2559;
    --coral: #FF7F92;
    --blue: #4475F2;
    --gray-100: #F4F7FE;
    --gray-200: #E9EDF7;
    --gray-300: #CFD7E6;
    --gray-400: #8F9BBA;
    --gray-500: #707EAE;
    --gray-600: #4D5875;
    --gray-700: #2D3748;
    --gray-800: #1A202C;
    --gray-900: #171923;
}

/* Base styles */
html, body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

/* Common components */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.1);
}

.glass-card-dark {
    background: rgba(27, 37, 89, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F4F7FE;
}

::-webkit-scrollbar-thumb {
    background: #CFD7E6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8F9BBA;
}

/* Profile card */
.profile-card {
    background: var(--card-bg, #1B2559);
    color: var(--text-color, #FFFFFF);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(68, 117, 242, 0.1) 0%, rgba(255, 127, 146, 0.1) 100%);
    z-index: 1;
}

.profile-card > * {
    position: relative;
    z-index: 2;
}

.profile-card .heading-color {
    color: var(--heading-color, #FFFFFF);
}

.profile-card .subtext-color {
    color: var(--subtext-color, #CFD7E6);
}

.profile-card .tier-badge {
    background-color: var(--badge-bg, rgba(255, 255, 255, 0.1));
    color: var(--badge-text, #FFFFFF);
}

.profile-card .btn-public-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 500;
    color: var(--badge-text, #FFFFFF);
    background-color: var(--badge-bg, rgba(255, 255, 255, 0.2));
    transition: background-color 0.2s;
}

.profile-card .btn-public-profile:hover {
    background-color: var(--accent-color, #4475F2);
    color: var(--text-color, #FFFFFF);
}

.disabled-theme {
    filter: grayscale(100%);
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important; /* Prevent hover effect */
}

/* Mobile Menu Animation */
#mobileMenu.show {
    display: block;
    max-height: 300px;
}

/* Progress bar */
.progress-bar {
    background-color: var(--progress-bar-bg, rgba(255, 255, 255, 0.2));
    height: 8px;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    background-color: var(--progress-bar-fill, #FFFFFF);
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease-in-out;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
    cursor: wait;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    margin: -0.75rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes gold-flash {
    0%, 100% {
        color: inherit;
        transform: scale(1);
    }
    25% {
        color: #FFD700;
        transform: scale(1.1);
    }
    75% {
        color: #FFD700;
        transform: scale(1.1);
    }
}

.animate-gold-flash {
    animation: gold-flash 1.5s ease-in-out;
}

/* Form elements */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.75rem;
    background-color: white;
    color: var(--gray-800);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(68, 117, 242, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--blue);
    color: white;
}

.btn-primary:hover {
    background-color: #3B68D9;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid currentColor;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: #1B2559;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    background: white;
    color: #2D3748 !important; /* Dark gray text for readability */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 50;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid #34D399;
}

.toast.error {
    border-left: 4px solid #F87171;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Profile Picture Upload */
.profile-pic-upload {
    position: relative;
    cursor: pointer;
}

.upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-pic-upload:hover .upload-overlay {
    opacity: 1;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Active navigation states */
.nav-active {
    color: var(--navy) !important;
    font-weight: 500;
}

/* Platform icons */
.platform-icon {
    transition: transform 0.2s ease;
}

.platform-icon:hover {
    transform: translateY(-2px);
}

/* Profile handle cards */
.handle-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.handle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Improved contrast for text */
.text-gray-600 {
    color: #4D5875 !important; /* Darker than default for better contrast */
}

.text-gray-700 {
    color: #2D3748 !important;
}

/* Toast text override to ensure visibility */
.toast p {
    color: #111827 !important; /* Very dark gray for maximum contrast on white backgrounds */
}

/* Ensure toast text is always white on colored backgrounds */
[class*="bg-green-"] p,
[class*="bg-red-"] p,
[class*="bg-blue-"] p,
[class*="bg-yellow-"] p,
[class*="bg-accent"] .text-white,
[class*="bg-primary"] .text-white {
    color: white !important;
}

/* Hero section styles */
.hero-card {
    background: linear-gradient(135deg, var(--navy) 0%, #2A3A7C 100%);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Admin panel styles */
.admin-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table th {
    padding: 0.75rem;
    font-weight: 600;
    text-align: left;
    color: var(--gray-600);
    border-bottom: 2px solid var(--gray-200);
}

.admin-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Mobile menu */
@media (max-width: 768px) {
    .mobile-menu {
        position: fixed;
        top: 4rem;
        left: 0;
        right: 0;
        background-color: white;
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }

    .mobile-menu.show {
        transform: translateY(0);
    }
}

.disabled-accordion .accordion-content {
    opacity: 0.5;
    pointer-events: none;
    background-color: #f9fafb; /* gray-50 */
}

.disabled-accordion .accordion-header {
    cursor: not-allowed;
}

/* Responsive loading overlays and skeletons */
@media (max-width: 640px) {
  .loading-state,
  .loading-state .absolute,
  #global-loading-overlay {
    position: fixed !important;
    inset: 0 !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    z-index: 1000 !important;
    background: rgba(255,255,255,0.95) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .loading-state .animate-spin,
  .loading-state .animate-pulse {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }
  .loading-state .text-sm {
    font-size: 1rem !important;
  }
}

/* Ensure overlays do not block fixed nav or mobile menu */
@media (max-width: 640px) {
  #global-loading-overlay {
    top: 3.5rem !important; /* leave space for mobile nav */
    height: calc(100vh - 3.5rem) !important;
  }
} 