/* Reset e Estilos Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: #333;
}

ul {
    list-style: none;
}

.btn {
    background-color: #4a6cfa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    background-color: #3a5ce8;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #4a6cfa;
    margin-bottom: 0;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 600;
    padding: 5px 0;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #4a6cfa;
    transition: width 0.3s;
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

nav ul li a.active {
    color: #4a6cfa;
}

/* Main Content */
main {
    padding: 40px 0;
}

/* Crypto Selector */
.crypto-selector {
    margin-bottom: 30px;
}

.crypto-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.crypto-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100px;
}

.crypto-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.crypto-option.selected {
    border: 2px solid #4a6cfa;
    transform: translateY(-5px);
}

.crypto-option img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

/* Price Display */
.price-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.current-price {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.price-value {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

#crypto-price {
    font-size: 2rem;
    font-weight: 700;
    margin-right: 10px;
}

#price-change {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
}

.positive {
    color: #00c853;
    background-color: rgba(0, 200, 83, 0.1);
}

.negative {
    color: #ff3d00;
    background-color: rgba(255, 61, 0, 0.1);
}

/* Chart Container */
.chart-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
    height: 400px;
}

#tradingview-chart {
    height: 100%;
}

/* Profit Calculator */
.profit-calculator {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.calculator-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Nunito', sans-serif;
}

#calculate-profit {
    grid-column: span 2;
    justify-self: center;
    width: 200px;
}

.profit-result {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.result-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    flex: 0 0 40%;
}

.result-card h3 {
    margin-bottom: 10px;
}

#profit-amount {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.result-details {
    flex: 0 0 55%;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.detail-item span:first-child {
    font-weight: 600;
}

/* Footer */
footer {
    background-color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-form {
        grid-template-columns: 1fr;
    }

    #calculate-profit {
        grid-column: 1;
    }

    .profit-result {
        flex-direction: column;
    }

    .result-card {
        margin-bottom: 20px;
        width: 100%;
    }

    .result-details {
        width: 100%;
    }
}