/* Fonts */
@font-face {
    font-family: 'LabGrotesque';  
    src: url('../fonts/LabGrotesqueMono-Regular.woff2') format('woff2'),
         url('../fonts/LabGrotesqueMono-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap; 
}

:root {
    font-family: 'LabGrotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Layout Containers */
.app-container {
    min-height: 100vh;
    background-color: #f8f9fa;
    padding: 0;
}

.main-content {
    max-width: 98%;
    margin: 0 auto;
    padding: 0.5rem;
    background: #f8f9fa;
}

/* Header */
.header-banner {
    background-color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-logo {
    height: 32px;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.brand-link:hover {
    opacity: 0.9;
    text-decoration: none;
    color: inherit;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
}

.nav-link.active {
    color: #2563eb;
}

.connect-wallet-btn {
    background-color: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
}

/* SuperVault Header */
.supervault-header {
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.supervault-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.supervault-logo {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.title-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.supervault-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 32px;
    border-bottom: none;
    text-decoration: none;
    padding-bottom: 0;
}

.chain-name {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background: #ffffff;
    font-size: 0.875rem;
    color: #666;
    margin-left: auto;
}

/* Vault Grid */
.vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

/* Vault Tiles */
.vault-tile {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px, rgba(0, 0, 0, 0.05) 0px 8px 24px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.vault-tile:hover {
    transform: translateY(-4px);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 40px;
    border-color: rgba(37, 99, 235, 0.3);
}

/* Vault Header */
.vault-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.protocol-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    background: #f8f9fa;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.vault-header-text h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #111827;
}

.vault-header-text p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.metrics-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metric-label {
    color: #6b7280;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.metric-value {
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    color: #111827;
}

/* Links */
.vault-link {
    font-size: 0.875rem;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.vault-link:hover {
    color: #000;
}

/* Footer */
.footer {
    background-color: white;
    padding: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: #6b7280;
    text-decoration: none;
}

.footer-link:hover {
    color: #2563eb;
}

/* Stats and Dashboard Elements */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.stat-change {
    font-size: 0.875rem;
}

.stat-change.positive {
    color: #059669;
}

.stat-change.negative {
    color: #dc2626;
}

/* SuperVault Section */
.supervault-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}

.supervault-section:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

/* Vault Footer */
.vault-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vault-link {
    text-decoration: none;
    color: #2563eb;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Integrations Page Styles */
.integrations-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
    text-align: center;
}

.page-description {
    font-size: 1.25rem;
    color: #4b5563;
    margin-bottom: 3rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.integration-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px, rgba(0, 0, 0, 0.05) 0px 8px 24px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.integration-card:hover {
    transform: translateY(-4px);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 40px;
    border-color: rgba(37, 99, 235, 0.3);
}

.integration-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 1.5rem;
}

.integration-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #111827;
}

.integration-description {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.integration-features {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.integration-features li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.integration-link {
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
    display: inline-block;
    margin-top: auto;
}

.integration-cta {
    background: #2563eb;
    color: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: white;
}

.cta-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    display: inline-block;
    background: white;
    color: #2563eb;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile responsiveness for Integrations page */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .integrations-grid {
        grid-template-columns: 1fr;
    }
    
    .integration-card {
        padding: 1.5rem;
    }
    
    .integration-cta {
        padding: 2rem 1rem;
    }
}

/* Integration cards grid - updated */
.integration-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    max-width: 100%;
}

.integration-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px, rgba(0, 0, 0, 0.05) 0px 8px 24px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.integration-card:hover {
    transform: translateY(-4px);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 40px;
    border-color: rgba(37, 99, 235, 0.3);
}

/* Integration section styles */
.integration-section {
    margin-bottom: 32px;
    padding-bottom: 16px;
}

.integration-subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 24px 0 16px;
    color: #111827;
    border-left: 4px solid #2563eb;
    padding-left: 12px;
}

/* PIGGY section specific styling */
.piggy-section .integration-subsection-title {
    border-left: 4px solid #FF69B4; /* Hot pink color for PIGGY section */
}

.piggy-section .integration-card .card-link {
    color: #FF69B4; /* Hot pink links for PIGGY section */
}

.piggy-section .integration-card:hover {
    border-color: rgba(255, 105, 180, 0.5); /* Hot pink border on hover for PIGGY section */
}

/* Card styles for integrations */
.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #111827;
}

.card-description {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.card-link {
    text-decoration: none;
    color: #2563eb;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: auto;
    display: inline-block;
}

.expiry-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

/* CRED section styles */
.cred-track-section {
    margin-bottom: 32px;
}

.cred-link {
    display: inline-block;
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
    margin: 8px 0;
}

.note-text {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
    margin: 8px 0;
    padding: 8px;
    background: #f9fafb;
    border-radius: 6px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 24px 0 16px;
    color: #111827;
}

.section-divider {
    border: 0;
    height: 1px;
    background-color: #e5e7eb;
    margin: 24px 0;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .integration-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .integration-subsection-title {
        font-size: 1.25rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
}

/* Charts Layout */
.charts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0 2rem 0;
    padding: 0 1rem;
}

.chart-column {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid rgba(0, 0, 0, 0.12);
    min-height: 350px; /* Ensure minimum height for charts */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .chart-column {
        min-height: 400px; /* Slightly taller on mobile */
    }
}

/* Inactive Vault Tiles */
.vault-tile.inactive {
    opacity: 0.6;
    background: #fafafa;
    pointer-events: none;  /* Disables hover effects */
}

.vault-tile.inactive .metrics-grid {
    background: #f3f4f6;
}

.vault-tile.inactive .metric-value,
.vault-tile.inactive .metric-label,
.vault-tile.inactive .vault-header-text h4,
.vault-tile.inactive .vault-header-text p {
    color: #6b7280;
}

.vault-tile.inactive .protocol-icon {
    opacity: 0.7;
}

.vault-tile.inactive .vault-footer .vault-link {
    pointer-events: auto;  /* Re-enable clicking on links */
    background: #f3f4f6;
    color: #6b7280;
}

/* Loading styles */
#loading-wrapper {
    position: relative;
    min-height: 200px;
}

/* Position the loading circle */
#loading {
    position: absolute;
    top: calc(50% - 5px);  /* Reduced from -10px to -5px */
    left: 50%;
    transform: translate(-50%, -50%);
}

.loading-text {
    position: absolute;
    top: calc(50% + 5px);  /* Reduced from +10px to +5px */
    left: 50%;
    transform: translate(-50%, 0);
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
    z-index: 1000;
}

/* Add media query for larger screens */
@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* Partner logos styling */
.partner-logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px 0 30px 0;
}

.partner-logo {
    height: 40px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.2s ease-in-out;
}

.partner-logo:hover {
    opacity: 1;
}