:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --success: #2ecc71;
    --warning: #f39c12;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #1D2749 url(https://cdn.cdatech.com.br/bg.png) no-repeat;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.calculator-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 30px;
    margin-top: 30px;
}

h2 {
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slider-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-container {
    flex: 1;
}

.text-input-container {
    width: 150px;
}

.text-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.text-input:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.text-input-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: #e0e0e0;
    border-radius: 4px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
}

.slider-value {
    text-align: center;
    font-weight: 600;
    margin-top: 10px;
    color: var(--secondary);
}

.usage-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.usage-option {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.usage-option:hover {
    border-color: var(--secondary);
    transform: translateY(-3px);
}

.usage-option.selected {
    border-color: var(--secondary);
    background-color: rgba(52, 152, 219, 0.05);
}

.usage-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
}

.usage-desc {
    font-size: 0.9rem;
    color: #666;
}

.bandwidth-estimate {
    font-size: 0.85rem;
    margin-top: 8px;
    color: var(--secondary);
    font-weight: 600;
}

textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s;
}

textarea:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.result-container {
    background: var(--light);
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    text-align: center;
}

.result-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.bandwidth-result {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 15px 0;
}

.recommendation {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    background: var(--accent);
    transform: none;
    box-shadow: none;
}

.btn-calculate {
    background: var(--secondary);
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 1.1rem;
}

.btn-calculate:hover {
    background: #2980b9;
}

.info-text {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-style: italic;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #777;
    border-top: 1px solid #eee;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-show {
    display: block !important;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #777;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent);
}

.modal-title {
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-column {
    flex: 1;
}

.date-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
}

.date-inputs input {
    flex: 1;
}

.captcha-container {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: center;
}

.captcha-text {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 5px;
    background: #eee;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    user-select: none;
}

.captcha-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    font-size: 16px;
}

.btn-submit {
    background: var(--success);
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 20px;
}

.btn-submit:hover {
    background: #27ae60;
}

.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message {
    background: var(--success);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    animation: fadeIn 0.5s ease-in;
}

.error-message {
    background: var(--accent);
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.redirect-info {
    font-size: 0.9rem;
    margin-top: 15px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.fallback-contact {
    display: none;
    background: var(--warning);
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin-top: 20px;
}

.fallback-contact a {
    color: white;
    text-decoration: underline;
    font-weight: bold;
}

.input-error {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
}

.error-text {
    color: var(--accent);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.loading-dots:after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .usage-options {
        grid-template-columns: 1fr;
    }
    
    .calculator-container {
        padding: 20px;
    }
    
    .slider-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .text-input-container {
        width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .date-inputs {
        flex-direction: column;
    }

    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
}