/* 梵音音乐钱包 - 币种管理样式 */

/* 币种管理容器 */
.token-management-container {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    overflow: hidden;
}

/* 导航栏 */
.token-nav {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.token-nav::-webkit-scrollbar {
    display: none;
}

.token-nav-btn {
    flex: 1;
    min-width: 100px;
    padding: 15px 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    white-space: nowrap;
}

.token-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.token-nav-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-bottom: 2px solid #fff;
}

.nav-icon {
    font-size: 18px;
}

.nav-text {
    font-size: 11px;
    font-weight: 500;
}

/* 内容区域 */
.token-content {
    padding: 20px;
    height: calc(100vh - 200px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 币种列表头部 */
.token-header {
    margin-bottom: 20px;
}

.token-search {
    position: relative;
    margin-bottom: 15px;
}

.token-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
}

.token-search input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    font-size: 16px;
}

.token-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 过滤器 */
.token-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.token-filters select {
    flex: 1;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.filter-btn {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 网络统计 */
.network-stats {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-network {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat-count {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-detail {
    font-size: 10px;
    opacity: 0.7;
}

/* 币种列表 */
.token-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.token-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.token-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.token-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.token-info {
    flex: 1;
    min-width: 0;
}

.token-symbol {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.token-name {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.token-network {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.network-badge, .native-badge, .default-badge, .custom-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

.network-badge {
    background: rgba(102, 126, 234, 0.3);
    color: #667eea;
}

.native-badge {
    background: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.default-badge {
    background: rgba(158, 158, 158, 0.3);
    color: #9e9e9e;
}

.custom-badge {
    background: rgba(255, 152, 0, 0.3);
    color: #ff9800;
}

.token-details {
    text-align: right;
    font-size: 12px;
    opacity: 0.8;
}

.token-address {
    margin-bottom: 5px;
}

.token-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.action-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.edit-btn {
    background: rgba(33, 150, 243, 0.3);
    color: #2196f3;
}

.edit-btn:hover {
    background: rgba(33, 150, 243, 0.5);
}

.delete-btn {
    background: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.delete-btn:hover {
    background: rgba(244, 67, 54, 0.5);
}

.default-label {
    font-size: 10px;
    opacity: 0.6;
    padding: 5px 10px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.empty-action {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.empty-action:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 表单样式 */
.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
}

.form-header p {
    margin: 0;
    opacity: 0.8;
    font-size: 14px;
}

.token-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-hint {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 5px;
}

.input-with-action {
    display: flex;
    gap: 10px;
}

.input-with-action input {
    flex: 1;
}

.input-action-btn {
    padding: 12px 20px;
    background: rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4caf50;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.input-action-btn:hover {
    background: rgba(76, 175, 80, 0.5);
}

.input-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 图标选择器 */
.icon-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-selector input {
    width: 80px !important;
    text-align: center;
    font-size: 18px;
}

.icon-presets {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.icon-preset {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.icon-preset:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 合约信息 */
.contract-info {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.contract-info h4 {
    margin: 0 0 10px 0;
    color: #4caf50;
    font-size: 16px;
}

.contract-details div {
    margin-bottom: 5px;
    font-size: 14px;
}

/* 表单按钮 */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.btn-outline {
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 导入界面 */
.import-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.import-option {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.import-option h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.import-option p {
    margin: 0 0 15px 0;
    opacity: 0.8;
    font-size: 14px;
}

.import-template {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.import-template h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
}

.import-template pre {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
}

.import-template code {
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.import-result {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.import-success {
    color: #4caf50;
    font-weight: 500;
    margin-bottom: 10px;
}

.import-errors {
    color: #ff9800;
    font-size: 14px;
}

.import-errors h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.import-errors ul {
    margin: 0;
    padding-left: 20px;
}

/* 消息提示 */
.token-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

.token-message-success {
    background: rgba(76, 175, 80, 0.9);
    color: white;
}

.token-message-error {
    background: rgba(244, 67, 54, 0.9);
    color: white;
}

.token-message-info {
    background: rgba(33, 150, 243, 0.9);
    color: white;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 移动设备适配 */
@media (max-width: 768px) {
    .token-content {
        padding: 15px;
        height: calc(100vh - 180px);
    }

    .token-nav-btn {
        padding: 12px 8px;
        min-width: 80px;
    }

    .nav-icon {
        font-size: 16px;
    }

    .nav-text {
        font-size: 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }

    .stat-card {
        padding: 12px;
    }

    .token-item {
        padding: 12px;
        gap: 12px;
    }

    .token-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .token-symbol {
        font-size: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    .import-options {
        grid-template-columns: 1fr;
    }

    .icon-presets {
        justify-content: center;
    }

    .token-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .token-content {
        padding: 10px;
    }

    .token-search input {
        font-size: 14px;
        padding: 10px 12px 10px 40px;
    }

    .token-filters {
        flex-direction: column;
        gap: 8px;
    }

    .token-item {
        flex-wrap: wrap;
        gap: 10px;
    }

    .token-details {
        order: 3;
        width: 100%;
        text-align: left;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 12px 20px;
        font-size: 14px;
        justify-content: center;
    }
}
