* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: #1a1a1a;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.2);
    overflow: hidden;
    border: 1px solid #2a2a2a;
}

header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: #e0e0e0;
    padding: 30px 20px;
    text-align: center;
    border-bottom: 2px solid #FF6B35;
}

.logo {
    margin-bottom: 15px;
}

.logo-name {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 50%, #FFA07A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
    letter-spacing: 2px;
    display: inline-block;
}

header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.btn-header {
    background: rgba(255, 107, 53, 0.2);
    color: #FF6B35;
    border: 2px solid #FF6B35;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-decoration: none;
    display: inline-block;
}

.btn-header:hover {
    background: #FF6B35;
    color: #1a1a1a;
    border-color: #FF6B35;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

main {
    padding: 30px 20px;
    background: #1a1a1a;
}

.form-calculadora {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e0e0e0;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #2a2a2a;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #0a0a0a;
    color: #e0e0e0;
}

.form-group input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
    background: #0f0f0f;
}

.form-group input::placeholder {
    color: #666;
}

.btn-calcular {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    color: #1a1a1a;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.5);
    background: linear-gradient(135deg, #FF8C42 0%, #FFA07A 100%);
}

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

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid rgba(255, 107, 53, 0.5);
    color: #FF6B35;
}

.alert-error ul {
    margin-top: 10px;
    margin-left: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.3);
    animation: slideDown 0.3s ease;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #2a2a2a;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    color: #e0e0e0;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1001;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
    color: #FF6B35;
    text-decoration: none;
}

.modal-content .resultado-juros {
    margin-top: 0;
    padding: 30px 20px;
}

.resultado-juros {
    margin-top: 0;
}

.card {
    background: #0a0a0a;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #2a2a2a;
    margin-bottom: 15px;
}

.card h3 {
    margin-bottom: 15px;
    color: #e0e0e0;
    font-size: 18px;
}

.valor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
}

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

.valor-item.highlight {
    background: rgba(255, 107, 53, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-top: 5px;
    border-bottom: none;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.valor-item .label {
    font-weight: 500;
    color: #b0b0b0;
}

.valor-item .valor {
    font-weight: 700;
    font-size: 18px;
    color: #e0e0e0;
}

.valor-item .valor.lucro {
    color: #FF6B35;
    font-size: 20px;
}

.card.info {
    background: rgba(255, 107, 53, 0.05);
    border-color: rgba(255, 107, 53, 0.3);
}

.card.info p {
    margin-bottom: 8px;
    color: #e0e0e0;
}

footer {
    background: #0a0a0a;
    padding: 15px;
    text-align: center;
    color: #888;
    font-size: 12px;
    border-top: 1px solid #2a2a2a;
}

/* Responsividade Mobile */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 24px;
    }

    .btn-header {
        font-size: 12px;
        padding: 8px 15px;
    }

    main {
        padding: 20px 15px;
    }

    .form-group input {
        font-size: 16px; /* Evita zoom no iOS */
    }

    .valor-item .valor {
        font-size: 16px;
    }

    .valor-item .valor.lucro {
        font-size: 18px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }

    .modal-content .resultado-juros {
        padding: 25px 15px;
    }

    .modal-close {
        right: 15px;
        top: 10px;
        font-size: 24px;
    }
}
