/* ===== TEAM & REWARDS COMPONENTS CSS - components-new.css ===== */

/* COMMON COMPONENT STYLES */
.team-component,
.rewards-component {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
}

.team-component h2,
.rewards-component h2 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    text-align: center;
}

/* Loading States */
.team-loading,
.rewards-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 212, 255, 0.1);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.team-loading p,
.rewards-loading p {
    color: var(--text-muted);
    font-family: var(--font-primary);
    font-size: 1.1rem;
}

/* Error States */
.team-error,
.rewards-error {
    text-align: center;
    padding: 4rem 2rem;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.team-error h3,
.rewards-error h3 {
    color: var(--accent-error);
    font-family: var(--font-primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.team-error p,
.rewards-error p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.retry-btn {
    background: var(--gradient-primary);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

/* ========== TEAM COMPONENT STYLES ========== */

/* Team Stats Grid */
.team-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.team-stat-card {
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.1) 0%, rgba(168, 85, 247, 0.05) 100%);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.team-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
    border-color: var(--accent-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-family: var(--font-primary);
    font-size: 3rem;
    color: var(--accent-primary);
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.stat-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Team Section Cards */
.team-section-card {
    background: var(--gradient-card);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.team-section-card h3 {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

/* Team Members List */
.team-members-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-member-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

[data-theme="light"] .team-member-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.team-member-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.15);
}

.member-number {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

.member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.member-id {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-weight: 700;
}

.member-name {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.member-address {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: monospace;
}

.member-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Level Accordion */
.levels-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.level-accordion-item {
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.level-accordion-item:hover {
    border-color: var(--accent-primary);
}

.level-accordion-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

[data-theme="light"] .level-accordion-header {
    background: rgba(255, 255, 255, 0.8);
}

.level-accordion-header:hover {
    background: rgba(0, 212, 255, 0.1);
}

.level-accordion-header.completed {
    border-left: 4px solid var(--accent-success);
}

.level-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.level-number {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-weight: 900;
}

.level-progress {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.level-toggle-icon {
    color: var(--accent-primary);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.level-accordion-content {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .level-accordion-content {
    background: rgba(0, 0, 0, 0.02);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-style: italic;
}

/* ========== REWARDS COMPONENT STYLES ========== */

.rewards-grid-component {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.reward-card-component {
    background: var(--gradient-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reward-card-component:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
}

.reward-card-component.distributed {
    border-color: var(--accent-success);
    background: linear-gradient(145deg, rgba(0, 255, 136, 0.1) 0%, var(--card-bg) 100%);
}

.reward-card-component.eligible {
    border-color: var(--accent-warning);
    background: linear-gradient(145deg, rgba(255, 170, 0, 0.1) 0%, var(--card-bg) 100%);
}

.reward-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.reward-title {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.reward-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.reward-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1rem;
    font-style: italic;
}

.reward-prize {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--accent-success);
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
}

.reward-status-badge {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    margin: 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-primary);
    width: 100%;
}

.reward-status-badge.distributed {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-success);
    border: 2px solid var(--accent-success);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
}

.reward-status-badge.eligible {
    background: rgba(255, 170, 0, 0.2);
    color: var(--accent-warning);
    border: 2px solid var(--accent-warning);
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.2);
}

.reward-status-badge.not-eligible {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.reward-requirements {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    width: 100%;
}

.requirement {
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

[data-theme="light"] .requirement {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.requirement.met {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-success);
    color: var(--accent-success);
}

.requirement .current {
    font-size: 0.75rem;
    opacity: 0.8;
}

.reward-distributed-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-success);
    border-radius: 8px;
    color: var(--accent-success);
    font-size: 0.85rem;
    text-align: center;
    font-weight: 600;
    width: 100%;
}

/* Tree View Fixes - MOBILE TREE LAYOUT FIX */
.tree-container-fixed {
    background: linear-gradient(145deg, rgba(30, 30, 46, 0.8) 0%, rgba(45, 45, 68, 0.6) 100%);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin: 1rem 0;
}

[data-theme="light"] .tree-container-fixed {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 240, 255, 0.7) 100%);
}

.tree-container-fixed h4 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.tree-level-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    position: relative;
}

.tree-children-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

.tree-node-fixed {
    background: var(--gradient-card);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 200px;
    max-width: 250px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tree-node-fixed:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    border-color: var(--accent-primary);
}

.tree-node-fixed.upline-node {
    border-color: var(--accent-purple);
}

.tree-node-fixed.current-user-node {
    border-color: var(--accent-success);
    border-width: 3px;
    transform: scale(1.05);
}

.tree-node-fixed.empty-node {
    border-style: dashed;
    opacity: 0.5;
}

.node-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.node-id {
    font-family: var(--font-primary);
    color: var(--accent-primary);
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.node-name {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.node-address {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: monospace;
}

.node-stats {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.stat-badge {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-primary);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-badge.success {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-success);
}

.empty-text {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.tree-stats-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(0, 212, 255, 0.2);
}

.tree-stats-section h5 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 1.5rem;
}

.tree-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.tree-stat-card {
    background: var(--gradient-card);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.tree-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.2);
}

.tree-stat-card.completed {
    border-color: var(--accent-success);
    background: linear-gradient(145deg, rgba(0, 255, 136, 0.1) 0%, var(--card-bg) 100%);
}

.stat-level {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-count {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--accent-primary);
    margin-bottom: 0.3rem;
}

.stat-status {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tree-stat-card.completed .stat-status {
    color: var(--accent-success);
}

/* MOBILE TREE LAYOUT FIX - Keep Tree Structure on Mobile */
@media screen and (max-width: 768px) {
    .tree-container-fixed {
        padding: 1rem 0.5rem !important;
        overflow-x: hidden !important;
        width: 100% !important;
    }

    .tree-container-fixed h4 {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
        padding: 0 0.5rem !important;
    }

    /* Keep tree structure - make nodes smaller but maintain layout */
    .tree-level-row {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 1.5rem 0 !important;
        width: 100% !important;
    }

    .tree-children-row {
        display: flex !important;
        justify-content: center !important;
        gap: 1rem !important;
        margin: 1.5rem 0 !important;
        width: 100% !important;
        flex-wrap: wrap !important;
    }

    /* Smaller nodes for mobile but keep tree layout */
    .tree-node-fixed {
        min-width: 140px !important;
        max-width: 160px !important;
        width: 140px !important;
        padding: 0.75rem !important;
        margin: 0 !important;
        font-size: 0.75rem !important;
    }

    .tree-node-fixed.current-user-node {
        transform: scale(1) !important;
        width: 150px !important;
        max-width: 150px !important;
    }

    .node-label {
        font-size: 0.65rem !important;
        margin-bottom: 0.4rem !important;
    }

    .node-id {
        font-size: 0.9rem !important;
        margin-bottom: 0.3rem !important;
    }

    .node-name {
        font-size: 0.8rem !important;
        margin-bottom: 0.3rem !important;
    }

    .node-address {
        font-size: 0.65rem !important;
        word-break: break-all !important;
    }

    .node-stats {
        flex-direction: column !important;
        gap: 0.3rem !important;
        margin-top: 0.4rem !important;
    }

    .stat-badge {
        width: 100% !important;
        font-size: 0.6rem !important;
        padding: 0.2rem 0.4rem !important;
    }

    /* Other mobile adjustments */
    .team-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    .team-member-item {
        flex-direction: column;
        text-align: center;
    }
    
    .level-header-left {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .rewards-grid-component {
        grid-template-columns: 1fr;
    }
}

/* Extra small mobile devices */
@media screen and (max-width: 480px) {
    .tree-container-fixed {
        padding: 0.75rem 0.25rem !important;
    }

    .tree-container-fixed h4 {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }

    /* Even smaller nodes for very small screens but maintain tree structure */
    .tree-node-fixed {
        min-width: 120px !important;
        max-width: 130px !important;
        width: 120px !important;
        padding: 0.6rem !important;
        font-size: 0.7rem !important;
    }

    .tree-node-fixed.current-user-node {
        width: 130px !important;
        max-width: 130px !important;
    }

    .node-label {
        font-size: 0.6rem !important;
    }

    .node-id {
        font-size: 0.8rem !important;
    }

    .node-name {
        font-size: 0.75rem !important;
    }

    .node-address {
        font-size: 0.6rem !important;
    }

    .tree-children-row {
        gap: 0.5rem !important;
    }

    .team-component h2,
    .rewards-component h2 {
        font-size: 1.5rem;
    }
    
    .team-section-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

/* Genealogy Section Container */
@media screen and (max-width: 768px) {
    .genealogy-section {
        padding: 1rem 0.5rem !important;
        margin: 1rem 0 !important;
    }

    .genealogy-tree {
        width: 100% !important;
        overflow-x: hidden !important;
    }
}

/* ===== GENEALOGY SEARCH STYLES - UNIQUE COMPONENT STYLES ===== */

/* Main genealogy search container */
.genealogy-search-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.genealogy-search-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.genealogy-search-header h5 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.genealogy-search-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Search controls */
.genealogy-search-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

.genealogy-search-input {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.genealogy-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.genealogy-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.genealogy-search-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #0099cc);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.genealogy-search-btn:hover {
    background: linear-gradient(135deg, #0099cc, var(--primary-color));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.genealogy-search-btn:active {
    transform: translateY(0);
}

.genealogy-clear-btn {
    padding: 0.75rem 1.25rem;
    background: var(--secondary-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.genealogy-clear-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* Search results container */
.genealogy-search-results {
    min-height: 3rem;
    padding: 1rem;
    background: var(--secondary-bg);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

.genealogy-search-results:empty {
    display: none;
}

/* Search result states */
.genealogy-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--primary-color);
    font-weight: 500;
    padding: 1rem;
}

.genealogy-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: genealogyLoadingSpin 1s linear infinite;
}

@keyframes genealogyLoadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.genealogy-error {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    color: var(--error-color);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Search result tree container */
.genealogy-search-tree {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.genealogy-search-tree h4 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.genealogy-user-info {
    text-align: center;
    padding: 0.75rem;
    background: var(--secondary-bg);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.genealogy-status-complete {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.genealogy-status-incomplete {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Tree structure for search results */
.genealogy-tree-level {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.genealogy-children-level {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Searched tree nodes - unique styling */
.genealogy-node-searched {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    min-width: 180px;
    max-width: 220px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.genealogy-node-searched:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Node type specific styling */
.genealogy-node-searched.upline-node {
    border-color: #ff6b35;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), var(--card-bg));
}

.genealogy-node-searched.searched-user-node {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), var(--card-bg));
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.genealogy-node-searched.right-child {
    border-color: #ffaa00;
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.1), var(--card-bg));
}

.genealogy-node-searched.genealogy-empty-node {
    border-style: dashed;
    border-color: var(--text-secondary);
    background: rgba(128, 128, 128, 0.05);
    opacity: 0.7;
}

/* Node content */
.genealogy-node-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--secondary-bg);
    border-radius: 4px;
}

.genealogy-node-id {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.genealogy-node-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.genealogy-node-address {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--secondary-bg);
    border-radius: 4px;
}

.genealogy-node-stats {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.genealogy-stat-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    background: var(--secondary-bg);
    color: var(--text-secondary);
}

.genealogy-stat-badge.genealogy-success {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.genealogy-node-error {
    color: var(--error-color);
    font-size: 0.8rem;
    font-style: italic;
    padding: 0.5rem;
}

.genealogy-empty-text {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.8rem;
    padding: 1rem;
}

/* Current matrix section */
.genealogy-current-matrix {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.genealogy-current-matrix h5 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Responsive design for genealogy search */
@media (max-width: 768px) {
    .genealogy-search-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .genealogy-search-input {
        min-width: unset;
        max-width: unset;
    }
    
    .genealogy-children-level {
        gap: 1rem;
    }
    
    .genealogy-node-searched {
        min-width: 150px;
        max-width: 180px;
    }
    
    .genealogy-search-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .genealogy-search-controls {
        gap: 0.5rem;
    }
    
    .genealogy-search-btn,
    .genealogy-clear-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .genealogy-node-searched {
        min-width: 130px;
        max-width: 160px;
        padding: 0.75rem;
    }
}

/* ===== SEARCH TREE SPECIFIC STYLES - ADD TO END OF components-new.css ===== */

/* Search tree container - more compact than main tree */
.search-tree-container {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    max-width: 100%;
}

.search-tree-container h4 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.search-user-info {
    text-align: center;
    padding: 0.5rem;
    background: var(--secondary-bg);
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

/* Search tree nodes - smaller version of main tree nodes */
.search-tree-node {
    min-width: 120px !important;
    max-width: 140px !important;
    width: 130px !important;
    padding: 0.75rem !important;
    font-size: 0.75rem !important;
}

.search-tree-node .node-label {
    font-size: 0.6rem !important;
    margin-bottom: 0.4rem !important;
}

.search-tree-node .node-id {
    font-size: 0.85rem !important;
    margin-bottom: 0.3rem !important;
}

.search-tree-node .node-name {
    font-size: 0.75rem !important;
    margin-bottom: 0.3rem !important;
}

.search-tree-node .node-address {
    font-size: 0.65rem !important;
}

.search-tree-node .node-stats {
    flex-direction: column !important;
    gap: 0.25rem !important;
    margin-top: 0.4rem !important;
}

.search-tree-node .stat-badge {
    width: 100% !important;
    font-size: 0.6rem !important;
    padding: 0.2rem 0.4rem !important;
}

.search-tree-node .empty-text {
    font-size: 0.75rem !important;
    padding: 0.5rem !important;
}

.search-tree-node .node-error {
    font-size: 0.7rem !important;
    padding: 0.5rem !important;
}

/* Search tree layout adjustments */
.search-tree-container .tree-level-row {
    margin: 1rem 0 !important;
}

.search-tree-container .tree-children-row {
    gap: 1rem !important;
    margin: 1rem 0 !important;
}

/* Mobile adjustments for search tree */
@media screen and (max-width: 768px) {
    .search-tree-container {
        padding: 0.75rem;
    }
    
    .search-tree-container h4 {
        font-size: 0.9rem;
    }
    
    .search-tree-node {
        min-width: 100px !important;
        max-width: 110px !important;
        width: 105px !important;
        padding: 0.5rem !important;
        font-size: 0.7rem !important;
    }
    
    .search-tree-node .node-label {
        font-size: 0.55rem !important;
    }
    
    .search-tree-node .node-id {
        font-size: 0.75rem !important;
    }
    
    .search-tree-node .node-name {
        font-size: 0.7rem !important;
    }
    
    .search-tree-node .node-address {
        font-size: 0.6rem !important;
    }
    
    .search-tree-container .tree-children-row {
        gap: 0.5rem !important;
    }
}

@media screen and (max-width: 480px) {
    .search-tree-node {
        min-width: 90px !important;
        max-width: 100px !important;
        width: 95px !important;
        padding: 0.4rem !important;
    }
    
    .search-tree-node .node-label {
        font-size: 0.5rem !important;
    }
    
    .search-tree-node .node-id {
        font-size: 0.7rem !important;
    }
}

/* Royalty Income Card */
#royaltyIncomeCard .stat-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 200, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

#royaltyIncomeCard .stat-card:hover {
    transform: translateY(-5px);
    border-color: #ffd700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

#royaltyIncomeCard .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

#royaltyIncomeCard .stat-label {
    font-size: 0.9rem;
    color: #ffd700;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#royaltyIncomeCard .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #royaltyIncomeCard .stat-value {
        font-size: 1.5rem;
    }
}