/**
 * DBH - Design System & Component Library
 * High-precision Bento Card Layout, App Center Matrix & Financial Pillars
 */

/* ==========================================================================
   Financial 3 Pillars Section
   ========================================================================== */

.pillars-section {
    padding: 80px 0 40px;
    position: relative;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 960px) {
    .pillars-grid {
        grid-template-columns: 1fr;
    }
}

.pillar-card {
    background: var(--bg-glass);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-md), var(--shadow-inner-glow);
}

.pillar-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 30px -10px var(--primary-glow);
}

.pillar-card.card-accent {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.12) 0%, rgba(21, 27, 38, 0.7) 100%);
    border-color: rgba(99, 102, 241, 0.35);
}

.pillar-card.account-accent {
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.12) 0%, rgba(21, 27, 38, 0.7) 100%);
    border-color: rgba(16, 185, 129, 0.35);
}

.pillar-card.loan-accent {
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.12) 0%, rgba(21, 27, 38, 0.7) 100%);
    border-color: rgba(245, 158, 11, 0.35);
}

.pillar-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.pillar-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pillar-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pillar-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pillar-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.pillar-feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.pillar-feature-list li {
    font-size: 0.84rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.pillar-feature-list li svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #34d399;
}

/* ==========================================================================
   App Center 17 Apps Section
   ========================================================================== */

.appcenter-section {
    padding: 60px 0 80px;
    position: relative;
}

.appcenter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.appcenter-tab-btn {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.appcenter-tab-btn:hover,
.appcenter-tab-btn.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.appcenter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}

.app-box {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.app-box:hover {
    border-color: var(--border-highlight);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), 0 0 20px -5px var(--primary-glow);
}

.app-box-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-box-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.app-box-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.app-box-category {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 600;
}

.app-box-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.app-box-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.app-tag-badge {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Bento Section (Hero Focus Items)
   ========================================================================== */

.bento-section {
    padding: 80px 0;
    position: relative;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.bento-card {
    background: var(--bg-glass);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-md), var(--shadow-inner-glow);
}

.bento-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 30px -10px var(--primary-glow);
}

.bento-card-header {
    position: relative;
    z-index: 2;
    margin-bottom: 24px;
}

.bento-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.bento-tag.player { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.bento-tag.drawing { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.bento-tag.backup { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.3); }

.bento-card-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.bento-card-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.bento-preview {
    position: relative;
    z-index: 2;
    width: 100%;
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }

@media (max-width: 960px) {
    .span-8, .span-6, .span-4 {
        grid-column: span 12;
    }
}

/* Specific Component Styles */
.player-mockup-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.player-track-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.player-artwork {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f43f5e 0%, #ec4899 50%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
    flex-shrink: 0;
}

.player-track-details {
    flex: 1;
    min-width: 0;
}

.player-track-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-track-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.player-protocol-badges {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.protocol-badge {
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.protocol-badge.nas {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.3);
}

.protocol-badge.hires {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

.audio-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 24px;
    margin-left: auto;
}

.audio-bar {
    width: 3px;
    background: #ec4899;
    border-radius: 3px;
    animation: bounceVisualizer 1.2s ease-in-out infinite alternate;
}

.audio-bar:nth-child(1) { height: 30%; animation-delay: 0.1s; }
.audio-bar:nth-child(2) { height: 80%; animation-delay: 0.3s; }
.audio-bar:nth-child(3) { height: 50%; animation-delay: 0.2s; }
.audio-bar:nth-child(4) { height: 100%; animation-delay: 0.4s; }
.audio-bar:nth-child(5) { height: 60%; animation-delay: 0.15s; }
.audio-bar:nth-child(6) { height: 40%; animation-delay: 0.35s; }

@keyframes bounceVisualizer {
    0% { height: 20%; }
    100% { height: 100%; }
}

.player-seek-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.player-seek-fill {
    height: 100%;
    width: 62%;
    background: linear-gradient(90deg, #ec4899, #8b5cf6);
    border-radius: 2px;
}

.player-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.player-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Drawing Component */
.drawing-mockup-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.canvas-toolbar-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

.brush-tools {
    display: flex;
    gap: 6px;
}

.brush-item {
    font-size: 0.76rem;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.brush-item.active {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.4);
    color: #e9d5ff;
}

.color-palette-dots {
    display: flex;
    gap: 5px;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.canvas-stroke-area {
    height: 90px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-stroke-svg {
    width: 90%;
    height: 80%;
}

.canvas-export-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.export-pill {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(168, 85, 247, 0.12);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

/* Backup Component */
.backup-mockup-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.backup-modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 600px) {
    .backup-modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.backup-module-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.backup-module-chip.checked {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(14, 165, 233, 0.1);
    color: #e0f2fe;
}

.backup-sync-targets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.sync-target-pill {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.sync-target-pill.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
}
