/* Crypto Price Tracker Tool Specific Styles */

/* Tool Header */
.tool-header {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    margin-top: 70px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tool-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.tool-header-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fbbf24;
    backdrop-filter: blur(10px);
}

.tool-header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tool-header-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.tool-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tool-features .feature {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-features .feature i {
    color: #fbbf24;
}

/* Crypto Tool Section */
.crypto-tool {
    padding: 80px 0;
    background: #f8fafc;
}

/* Crypto Search Form */
.crypto-search-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.search-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.search-header p {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.input-group {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
}

.form-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.4);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Crypto Results */
.crypto-results {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.crypto-symbol {
    font-size: 2rem;
    font-weight: 700;
    color: #a855f7;
    font-family: 'Courier New', monospace;
    background: #faf5ff;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    display: inline-block;
}

/* Current Crypto Data */
.current-crypto-data {
    margin-bottom: 2rem;
}

.crypto-price-section {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-radius: 15px;
    border: 2px solid #e9d5ff;
}

.crypto-price {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
}

.price-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.change-amount {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.change-amount.positive {
    background: #dcfce7;
    color: #166534;
}

.change-amount.negative {
    background: #fee2e2;
    color: #991b1b;
}

.change-percent {
    color: #64748b;
}

.crypto-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.detail-card:hover {
    border-color: #a855f7;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.1);
}

.detail-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.detail-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.detail-content p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* Crypto Statistics */
.crypto-stats {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.crypto-stats h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crypto-stats h3 i {
    color: #a855f7;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.value {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Price Chart Section */
.price-chart-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.price-chart-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-chart-section h3 i {
    color: #a855f7;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.time-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e9d5ff;
    background: white;
    color: #a855f7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.time-btn:hover {
    background: #faf5ff;
}

.time-btn.active {
    background: #a855f7;
    color: white;
    border-color: #a855f7;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    height: 400px;
    position: relative;
}

/* Top Cryptocurrencies */
.top-cryptos {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.top-cryptos h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-cryptos h3 i {
    color: #fbbf24;
}

.cryptos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.crypto-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.crypto-card:hover {
    border-color: #a855f7;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.1);
}

.crypto-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.crypto-card-symbol {
    font-size: 1.2rem;
    font-weight: 700;
    color: #a855f7;
    font-family: 'Courier New', monospace;
}

.crypto-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Courier New', monospace;
}

.crypto-card-change {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.crypto-card-name {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Market Overview */
.market-overview {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.market-overview h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.market-overview h3 i {
    color: #3b82f6;
}

.market-stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.market-stat-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.market-stat-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.stat-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3b82f6;
    font-family: 'Courier New', monospace;
}

/* Portfolio Tracker */
.portfolio-tracker {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-tracker h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-tracker h3 i {
    color: #f59e0b;
}

.portfolio-form {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.form-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.portfolio-summary {
    background: #f0f9ff;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #bae6fd;
    margin-bottom: 2rem;
}

.portfolio-summary h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.portfolio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.portfolio-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.portfolio-stat .label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.portfolio-stat .value {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    font-family: 'Courier New', monospace;
}

.portfolio-holdings {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.portfolio-holdings h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.holding-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.75rem;
}

.holding-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.holding-symbol {
    font-size: 1rem;
    font-weight: 600;
    color: #a855f7;
    font-family: 'Courier New', monospace;
}

.holding-amount {
    font-size: 0.9rem;
    color: #64748b;
}

.holding-value {
    text-align: right;
}

.holding-current-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.25rem;
}

.holding-pnl {
    font-size: 0.9rem;
    font-weight: 500;
}

.holding-pnl.positive {
    color: #166534;
}

.holding-pnl.negative {
    color: #991b1b;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto 2rem;
}

.error-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-state h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.error-state p {
    color: #64748b;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-header-text h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
        width: 100%;
    }
    
    .quick-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .crypto-details-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cryptos-grid {
        grid-template-columns: 1fr;
    }
    
    .market-stats-overview {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .crypto-price {
        font-size: 2.5rem;
    }
    
    .chart-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 100px 0 60px;
        margin-top: 60px;
    }
    
    .tool-header-text h1 {
        font-size: 1.8rem;
    }
    
    .tool-features {
        flex-direction: column;
        align-items: center;
    }
    
    .crypto-search-form {
        padding: 1.5rem;
    }
    
    .form-input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .crypto-symbol {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
    }
    
    .detail-card {
        padding: 1rem;
    }
    
    .detail-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .chart-controls {
        flex-wrap: wrap;
    }
    
    .time-btn {
        flex: 1;
        min-width: 60px;
    }
    
    .portfolio-stats {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .action-buttons,
    .crypto-search-form,
    .chart-controls {
        display: none !important;
    }
    
    .crypto-tool {
        background: white;
        padding: 0;
    }
    
    .crypto-results,
    .top-cryptos,
    .market-overview,
    .portfolio-tracker {
        box-shadow: none;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
    
    .detail-card,
    .crypto-stats,
    .price-chart-section {
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
    
    .chart-container {
        height: 300px;
    }
}
