/* Estilos específicos para a página de mercado */

.main {
    padding-top: 80px;
    min-height: 100vh;
    background: #0a0a0a;
}

/* Market Header */
.market-header {
    padding: 2rem 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.title-section {
    flex: 1;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.page-subtitle {
    font-size: 1.2rem;
    color: #cccccc;
    margin: 0;
}

.market-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    min-width: 120px;
}

.stat-label {
    font-size: 0.8rem;
    color: #888888;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-change.positive {
    color: #00ff88;
}

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

.stat-change.neutral {
    color: #888888;
}

/* Market Controls */
.market-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.search-container {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
}

.search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    background: rgba(255, 255, 255, 0.12);
}

.search-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.filter-container {
    display: flex;
    gap: 1rem;
}

.filter-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.filter-select option {
    background: #1a1a1a;
    color: #ffffff;
}

/* Treemap Section */
.treemap-section {
    padding: 2rem 0;
}

.treemap-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2px;
    background: #000000;
    border-radius: 8px;
    overflow: hidden;
    min-height: 600px;
    margin-bottom: 2rem;
}

.treemap-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.treemap-block:hover {
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 215, 0, 0.5);
}

.treemap-block.large {
    grid-column: span 3;
    grid-row: span 2;
    min-height: 160px;
}

.treemap-block.medium {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 120px;
}

.treemap-block.small {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 80px;
}

.block-symbol {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.block-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.block-change {
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.block-volume {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

/* Color System */
.positive-strong {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
}

.positive-medium {
    background: linear-gradient(135deg, #66ff99 0%, #33dd77 100%);
}

.positive-light {
    background: linear-gradient(135deg, #99ffaa 0%, #66ee88 100%);
}

.neutral {
    background: linear-gradient(135deg, #666666 0%, #555555 100%);
}

.negative-light {
    background: linear-gradient(135deg, #ffaa99 0%, #ee8866 100%);
}

.negative-medium {
    background: linear-gradient(135deg, #ff6666 0%, #dd3333 100%);
}

.negative-strong {
    background: linear-gradient(135deg, #ff4444 0%, #cc2222 100%);
}

/* Legend */
.legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.legend-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFD700;
    margin-right: 1rem;
}

.legend-items {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #cccccc;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Asset Modal */
.asset-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.asset-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFD700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #888888;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ffffff;
}

.asset-info {
    margin-bottom: 2rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #888888;
}

.info-value {
    font-weight: 600;
    color: #ffffff;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    flex: 1;
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    color: #000000;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
}

.btn-secondary {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #FFD700;
}

/* Responsividade */
@media (max-width: 1200px) {
    .treemap-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .treemap-block.large {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .legend {
        flex-direction: column;
        gap: 1rem;
    }
    
    .legend-items {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .market-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .market-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-container {
        max-width: none;
    }
    
    .filter-container {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-select {
        flex: 1;
        min-width: auto;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .treemap-container {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        min-height: 400px;
    }
    
    .treemap-block.large,
    .treemap-block.medium {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 80px;
    }
    
    .block-symbol {
        font-size: 0.8rem;
    }
    
    .block-price {
        font-size: 0.7rem;
    }
    
    .block-change {
        font-size: 0.6rem;
    }
    
    .block-volume {
        display: none;
    }
    
    .legend-items {
        gap: 1rem;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main {
        padding-top: 70px;
    }
    
    .market-header {
        padding: 1.5rem 0;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem;
        min-width: 100px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .treemap-container {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        min-height: 300px;
    }
    
    .treemap-block {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    .block-symbol {
        font-size: 0.7rem;
    }
    
    .block-price {
        font-size: 0.6rem;
    }
    
    .block-change {
        font-size: 0.5rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.treemap-block {
    animation: fadeIn 0.6s ease-out;
}

.treemap-block:nth-child(odd) {
    animation-delay: 0.1s;
}

.treemap-block:nth-child(even) {
    animation-delay: 0.2s;
}


/* Navegação - Estilos específicos para páginas internas */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-link {
    color: #ffffff;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-link:hover {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-1px);
}

/* Responsividade para páginas internas */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 1rem 2rem;
        width: 90%;
        text-align: center;
        border-radius: 8px;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
    }

    .hamburger span {
        width: 25px;
        height: 3px;
        background: #FFD700;
        margin: 3px 0;
        transition: 0.3s;
    }

    .market-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .market-header h1 {
        font-size: 2rem;
    }

    .market-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 1rem;
    }

    .main {
        padding-top: 70px;
    }

    .market-header h1 {
        font-size: 1.8rem;
    }

    .market-item {
        padding: 0.8rem;
    }

    .stat-card {
        padding: 1rem;
    }
}

