* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
}

body {
    background-color: #1a1a1a;
    color: #ffffff;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #333;
}

.logo {
    background-color: #00ff9d;
    color: #1a1a1a;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
}

.user-info {
    background-color: #252525;
    padding: 10px 20px;
    border-radius: 8px;
}

.dashboard {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.chart-section {
    background-color: #252525;
    padding: 20px;
    border-radius: 12px;
}

.chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.indicators {
    display: flex;
    gap: 15px;
}

.indicators label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.indicators input[type='checkbox'] {
    width: auto;
    margin: 0;
}

.chart-container {
    height: 400px;
    margin-bottom: 15px;
}

.volume-container {
    height: 100px;
}

.trading-panel {
    background-color: #252525;
    padding: 20px;
    border-radius: 12px;
}

.assets-list, .trading-form {
    margin-bottom: 20px;
}

select, input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    background-color: #333;
    border: none;
    border-radius: 6px;
    color: #fff;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

button {
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.3s;
}

button:hover {
    opacity: 0.8;
}

.buy-btn {
    background-color: #00ff9d;
    color: #1a1a1a;
    position: relative;
    overflow: hidden;
}

.buy-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.buy-btn:hover::before {
    width: 300%;
    height: 300%;
}

.sell-btn {
    background-color: #ff4d4d;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.sell-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.sell-btn:hover::before {
    width: 300%;
    height: 300%;
}

.portfolio {
    background-color: #252525;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

#assetsList, #portfolioList {
    display: grid;
    gap: 10px;
}

.asset-card {
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
    transform-origin: center;
}

.asset-card:hover {
    transform: scale(1.02);
    background-color: #3a3a3a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.asset-card::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 0.9em;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
}

.asset-card:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: 110%;
}

.asset-price {
    color: #00ff9d;
    font-weight: bold;
    position: relative;
    padding: 4px 8px;
    border-radius: 4px;
}

.asset-price.flash-green {
    animation: priceFlash 1s ease;
}

.asset-price.flash-red {
    animation: priceFlash 1s ease;
}

@keyframes priceFlash {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(0, 255, 157, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

.price-down {
    color: #ff4d4d;
}

.portfolio-item {
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.portfolio-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #00ff9d, #4d4dff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.portfolio-item:hover::after {
    transform: scaleX(1);
}

.portfolio-item:hover {
    transform: translateX(5px);
    background-color: #3a3a3a;
}

.portfolio-item .asset-info {
    flex: 1;
}

.portfolio-item .value-info {
    text-align: right;
}

.portfolio-item .total-value {
    display: block;
    color: #fff;
    margin-bottom: 5px;
}

.profit {
    color: #00ff9d;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #252525;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #00ff9d;
}

.price-history-table {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.price-history-table table {
    width: 100%;
    border-collapse: collapse;
}

.price-history-table th,
.price-history-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.price-history-table th {
    background-color: #333;
    color: #00ff9d;
}

.history-button {
    background-color: #4d4dff;
    color: white;
    padding: 5px 10px;
    margin-left: 10px;
    border-radius: 4px;
}

.asset-sector {
    color: #888;
    font-size: 0.9em;
    margin-left: 10px;
}

.loss {
    color: #ff4d4d;
}

/* Estilos para el agente automático */
.bot-section {
    background-color: #1a1a2e;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.bot-section h3 {
    color: #00ff9d;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.bot-controls {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.bot-controls span {
    margin-left: 10px;
    color: #fff;
}

.bot-strategy, .bot-projection {
    margin-bottom: 15px;
}

.bot-strategy label, .bot-projection label {
    color: #fff;
    margin-right: 10px;
}

.bot-strategy select {
    background-color: #2a2a3a;
    color: #fff;
    border: 1px solid #444;
    padding: 5px 10px;
    border-radius: 5px;
}

/* Switch para activar/desactivar el bot */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #00ff9d;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Estilos para el historial de transacciones del bot */
.bot-history {
    margin-top: 20px;
    background-color: #1a1a2e;
    border-radius: 10px;
    padding: 15px;
}

.bot-history h3 {
    color: #00ff9d;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.transaction-list {
    max-height: 200px;
    overflow-y: auto;
}

.transaction {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #333;
    font-size: 0.9rem;
}

.transaction:last-child {
    border-bottom: none;
}

.transaction.buy .action {
    color: #00ff9d;
}

.transaction.sell .action {
    color: #ff4d4d;
}

.transaction .time {
    color: #888;
    width: 20%;
}

.transaction .action {
    width: 15%;
    font-weight: bold;
}

.transaction .details {
    width: 40%;
    color: #fff;
}

.transaction .total {
    width: 25%;
    text-align: right;
    color: #fff;
}

/* Insignia para activos comprados por el bot */
.bot-badge {
    background-color: #ff9d00;
    color: #000;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #252525;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #00ff9d;
}

.notification.warning {
    border-left: 4px solid #ffd700;
}

.notification.error {
    border-left: 4px solid #ff4d4d;
}

.quick-stats {
    background-color: #252525;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    margin: 10px 0;
}

.stat-label {
    color: #888;
    font-size: 0.9em;
}

.favorite-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.favorite-btn.active {
    color: #ffd700;
}

.favorite-btn:hover {
    color: #ffd700;
}