
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --highlight-color: #ffeb3b;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 140px;
    background-image: url('../images/abstract-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: -1;
}

.container {
    flex: 1;
}

.navbar.fixed-top {
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fixed-header {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-logo {
    height: 34px;
    width: auto;
    display: block;
}

.navbar-toggler {
    order: 3;
    margin-left: auto;
}

.navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.navbar-collapse.collapsing,
.navbar-collapse.show {
    display: block;
}

.navbar-collapse:not(.show) {
    display: none;
}

.navbar-nav {
    text-align: right;
    padding: 0.5rem 0;
}

.navbar-nav .nav-item {
    text-align: right;
}

.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem 1.5rem;
}

.navbar-nav .nav-link i {
    margin-right: 0.5rem;
}

.nav-icon-svg {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.nav-icon-svg svg {
    height: 1.1em;
    width: auto;
}

@media (min-width: 992px) {

    .navbar-toggler {
        display: none !important;
    }

    .navbar-collapse {
        position: static;
        display: flex !important;
        flex-basis: auto;
        background: none;
        box-shadow: none;
    }

    .navbar-collapse.collapsing {
        transition: none;
    }

    .navbar-nav {
        flex-direction: row;
        padding: 0;
        margin-left: auto;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
}

.title-icon-svg {
    display: inline-flex;
    vertical-align: middle;
}

.title-icon-svg svg {
    height: 1em;
    width: auto;
}

.home-logo {
    width: 100%;
    max-width: 320px;
    height: auto;
}

.main-card {
    border: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.main-card:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.main-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.main-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.main-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.main-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.icon-wrapper {
    font-size: 5rem;
    opacity: 0.9;
}

.card-title {
    font-size: 1.8rem;
}

.breadcrumb {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
}

.search-box {
    max-width: 600px;
    margin: 2rem auto;
}

.search-input {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

#mindmap-container {
    width: 100%;
    height: auto;
    min-height: auto;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    background-color: #fafafa;
    position: relative;
    overflow: visible;
}

.mindmap-svg {
    width: 100%;
    height: 100%;
}

.node {
    cursor: pointer;
    transition: all 0.3s ease;
}

.node circle,
.node ellipse,
.node rect {
    transition: all 0.3s ease;
}

.node:hover circle,
.node:hover ellipse,
.node:hover rect {
    filter: brightness(1.1);
    stroke-width: 3px;
}

.node-level-0 circle,
.node-level-0 ellipse,
.node-level-0 rect {
    fill: #7c8dff;
    stroke: #5a6fd8;
    stroke-width: 2px;
}

.node-level-0 text {
    fill: white;
    font-weight: 600;
    font-size: 14px;
}

.node-level-1 circle,
.node-level-1 ellipse,
.node-level-1 rect {
    fill: #a8b5ff;
    stroke: #8a9aed;
    stroke-width: 2px;
}

.node-level-1 text {
    fill: #333;
    font-size: 12px;
}

.node-level-2 circle,
.node-level-2 ellipse,
.node-level-2 rect {
    fill: #c5d0ff;
    stroke: #a8b5ff;
    stroke-width: 1px;
}

.node-level-2 text {
    fill: #333;
    font-size: 11px;
}

.node-highlight circle,
.node-highlight ellipse,
.node-highlight rect {
    fill: var(--highlight-color) !important;
    stroke: #f57c00 !important;
    stroke-width: 4px !important;
    filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.8));
}

.node-highlight text {
    fill: #333 !important;
    font-weight: bold !important;
}

.link {
    fill: none;
    stroke: #999;
    stroke-width: 2px;
    stroke-opacity: 0.6;
    transition: all 0.3s ease;
}

.link:hover {
    stroke: var(--primary-color);
    stroke-width: 3px;
    stroke-opacity: 1;
}

.node text {
    text-anchor: middle;
    pointer-events: none;
}

.count-badge {
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.custom-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    z-index: 10;
}

.zoom-btn {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    border: none;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    color: #0d6efd;
}

.zoom-btn:hover {
    background-color: #0d6efd;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.legend {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #999;
}

.footer {
    margin-top: auto;
}

@media (max-width: 768px) {

    body {
        padding-top: 120px;
        background-attachment: scroll;
        background-size: cover;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-logo {
        height: 28px;
    }

    .fixed-header {
        padding: 0.5rem 0;
    }

    .fixed-header .d-flex {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .fixed-header h1 {
        font-size: 1.1rem !important;
        text-align: center;
    }

    .search-box-inline {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    .search-input {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    #mindmap-container {
        height: auto;
        min-height: calc(100vh - 180px);
        border-radius: 10px;
        margin: 0 -0.5rem;
    }

    .zoom-controls {
        top: 10px;
        right: 10px;
        gap: 5px;
    }

    .zoom-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .legend {
        padding: 1rem;
        margin-top: 1rem;
        font-size: 0.85rem;
    }

    .legend h5 {
        font-size: 1rem;
    }

    .legend-color {
        width: 20px;
        height: 20px;
    }

    .legend ul {
        padding-left: 1.2rem;
        font-size: 0.8rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .icon-wrapper {
        font-size: 3rem;
    }

    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

@media (max-width: 400px) {
    body {
        padding-top: 110px;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .fixed-header h1 {
        font-size: 1rem !important;
    }

    #mindmap-container {
        min-height: calc(100vh - 160px);
    }

    .zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

@media (min-width: 1200px) {
    .home-cards-row {
        flex-wrap: wrap;
    }

    .home-card-col {
        flex: 0 0 24%;
        max-width: 24%;
    }
}

.page-home .main-card {
    border-radius: 15px;
}

.page-home .main-card .card-body {
    padding: 1rem !important;
}

.page-home .icon-wrapper {
    font-size: 3.5rem;
}

.page-home .card-title {
    font-size: 1.1rem;
}

.page-home .card-text {
    font-size: 0.8rem;
    line-height: 1.3;
}

.page-home .main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

@media (max-width: 1199px) {
    .page-home .icon-wrapper {
        font-size: 3rem;
    }

    .page-home .card-title {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    .page-home .icon-wrapper {
        font-size: 2.5rem;
    }

    .page-home .card-title {
        font-size: 0.95rem;
    }

    .page-home .card-text {
        font-size: 0.75rem;
    }
}

body.page-home {
    padding-top: 80px;
}

@media (max-width: 767px) {
    body.page-home {
        padding-top: 70px;
    }
}
