/* Tools Page Specific Styles */

/* Hero */
.tools-hero {
    background: linear-gradient(135deg, #8338ec 0%, #3a86ff 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.tools-hero h1 {
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* Tools Navigation */
.tools-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.tool-tab {
    background: white;
    border: 2px solid var(--light-gray);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.tool-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tool-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Tool Sections */
.tool-section {
    display: none;
    padding: 2rem 0;
}

.tool-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Calculator */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 992px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
}

.calculator-form, .converter-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-calculate, .btn-convert, .btn-swap {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 1rem;
    transition: var(--transition);
}

.btn-calculate:hover, .btn-convert:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.calculator-results {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.result-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: var(--gray);
}

.result-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.result-value.profit {
    color: var(--success);
}

.result-value.loss {
    color: var(--danger);
}

.chart-bar {
    display: flex;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.chart-investment, .chart-profit {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    transition: width 0.5s ease;
}

/* Converter */
.converter-container {
    margin: 2rem 0;
}

.conversion-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: end;
}

@media (max-width: 768px) {
    .conversion-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.conversion-from, .conversion-to {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.conversion-swap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-swap {
    background: var(--light-gray);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-swap:hover {
    background: var(--primary);
    color: white;
    transform: rotate(180deg);
}

.currency-select {
    margin-top: 1rem;
}

.currency-select select,
.currency-select input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-size: 1.2rem;
}

.currency-select input:read-only {
    background-color: #f8f9fa;
}

.conversion-rate {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.rate-update {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

.popular-conversions {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.conversion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.conversion-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    transition: var(--transition);
}

.conversion-item:hover {
    background: #e9ecef;
}

.conversion-value {
    font-weight: 600;
    color: var(--primary);
}

/* Portfolio */
.portfolio-controls {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.btn-add-asset, .btn-reset, .btn-export {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-add-asset {
    background: var(--primary);
    color: white;
}

.btn-reset {
    background: var(--light-gray);
    color: var(--dark);
}

.btn-export {
    background: var(--secondary);
    color: white;
}

.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--dark);
}

.summary-change {
    font-size: 0.9rem;
}

.summary-change.positive {
    color: var(--success);
}

.summary-change.negative {
    color: var(--danger);
}

.summary-change.neutral {
    color: var(--gray);
}

.holdings-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.holdings-table th {
    background: var(--dark);
    color: white;
    padding: 1rem;
    text-align: left;
}

.holdings-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.holdings-table tr:last-child td {
    border-bottom: none;
}

.asset-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.allocation-bar {
    width: 100%;
    height: 24px;
    background: var(--light-gray);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.allocation-fill {
    height: 100%;
    border-radius: 12px;
    position: absolute;
    top: 0;
    left: 0;
}

.allocation-bar span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-edit, .btn-delete {
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.btn-edit:hover {
    color: var(--primary);
}

.btn-delete:hover {
    color: var(--danger);
}

.portfolio-chart {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.chart-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .chart-container {
        grid-template-columns: 1fr;
    }
}

.pie-chart-placeholder {
    display: flex;
    justify-content: center;
}

.pie-chart {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        #f7931a 0% 42%,
        #627eea 42% 74%,
        #00ffa3 74% 89%,
        #0033ad 89% 100%
    );
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Gas Tracker */
.gas-tracker {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.gas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.gas-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--success);
}

.status-indicator.active {
    background-color: var(--success);
}

.gas-prices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gas-tier {
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    background: #f8f9fa;
    transition: var(--transition);
    cursor: pointer;
}

.gas-tier:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.gas-tier.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.gas-tier.active .gas-gwei {
    color: white;
}

.gas-gwei {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--primary);
}

.gas-time, .gas-cost {
    font-size: 0.9rem;
    color: var(--gray);
}

.gas-tier.active .gas-time,
.gas-tier.active .gas-cost {
    color: rgba(255, 255, 255, 0.9);
}

.gas-calculator {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.calculator-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .calculator-inputs {
        grid-template-columns: 1fr;
    }
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-size: 1rem;
}

.input-note {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.5rem;
    display: block;
}

.gas-slider {
    margin-top: 1rem;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--light-gray);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.result {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-radius: 6px;
}

.result span:first-child {
    color: var(--gray);
}

.result span:last-child {
    font-weight: 600;
    font-size: 1.1rem;
}

.gas-history {
    margin-top: 2rem;
}

.history-chart-placeholder {
    height: 200px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.chart-visual {
    width: 90%;
    height: 100px;
    position: relative;
}

.chart-line {
    width: 100%;
    height: 2px;
    background: var(--primary);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.chart-note {
    font-size: 0.9rem;
    color: var(--gray);
    text-align: center;
    margin-top: 1rem;
}

.disclaimer-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.disclaimer-box h4 {
    color: #856404;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.disclaimer-box p {
    color: #856404;
    margin-bottom: 0;
}