@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #313EF6;
    --secondary-color: #A3C718;
    --background-color: white;
    --text-dark: #1a1a1a;
    --text-light: #6b7280;
    --border-color: white;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --hover-bg: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    background: white;
    color: var(--text-dark);
    min-height: 100vh;
}

.top-bar {
    background: var(--primary-color);
    padding: 15px 0;
    box-shadow: var(--shadow-medium);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

.company-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 0;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--secondary-color);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 150px;
    justify-content: flex-end;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.4);
    background: transparent;
    transition: var(--transition);
}

.language-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.8);
}

.contact-btn {
    background: white !important;
    color: var(--primary-color) !important;
    padding: 8px 20px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    border: 2px solid white !important;
    transition: all 0.3s ease !important;
}

.contact-btn:hover {
    background: transparent !important;
    color: white !important;
    border-color: white !important;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 4px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--primary-color);
    border-top: 1px solid rgba(255,255,255,0.2);
    z-index: 999;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.mobile-menu.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s ease;
    font-weight: 500;
}

.mobile-nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    transition: var(--transition);
}

.container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    margin: 80px auto 20px;
    width: 98%;
    max-width: 1200px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.header {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 25px 20px 20px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}

.progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 16px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.4;
    transition: var(--transition);
    min-width: 80px;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: var(--transition);
    font-size: 16px;
}

.progress-step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.progress-step.completed .step-number {
    background: var(--secondary-color);
    color: white;
}

.step-title {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: var(--text-light);
    line-height: 1.2;
}

.progress-step.active .step-title,
.progress-step.completed .step-title {
    color: var(--text-dark);
    font-weight: 600;
}

.progress-line {
    width: 40px;
    height: 2px;
    background: var(--border-color);
    margin: 0 8px;
}

.progress-step.completed + .progress-line {
    background: var(--secondary-color);
}

.form-step {
    display: none;
    flex: 1;
    overflow-y: visible;
    padding: 16px;
    min-height: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-step.active {
    display: flex;
    flex-direction: column;
}

/* Animaciones para cambio de fases */
.form-step.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.form-step.fade-in {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.number-control {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--border-radius);
    background: transparent;
    overflow: visible;
    max-width: 120px;
    width: 120px;
    margin: 0 auto;
    height: 40px;
    gap: 8px;
}

.number-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0;
}

.number-btn:hover {
    background: #2832d4;
    transform: scale(1.1);
}

.number-btn:active {
    transform: scale(0.9);
}

.number-btn.decrease {
    border-right: none;
}

.number-btn.increase {
    border-left: none;
}

.number-control .device-number {
    border: 1px solid var(--border-color);
    text-align: center;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 32px;
    font-size: 16px;
    font-weight: 600;
    background: white;
    transition: all 0.2s ease;
    margin: 0;
    padding: 0;
    border-radius: 4px;
    box-sizing: border-box;
    line-height: 30px;
    flex-shrink: 0;
}

.number-control .device-number:focus {
    outline: none;
    box-shadow: none;
    background: white;
}

.number-control .device-number:read-only {
    cursor: default;
}

.number-control * {
    box-sizing: border-box;
}

.number-control {
    overflow: visible !important;
}

.nav-buttons .btn {
    transition: all 0.3s ease;
}

.nav-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 62, 246, 0.3);
}

.progress-step {
    transition: all 0.4s ease;
}

.progress-step.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(49, 62, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(49, 62, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(49, 62, 246, 0);
    }
}

/* Efectos de hover para botones de uso */
.usage-button {
    transition: all 0.2s ease;
}

.usage-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .main-navigation,
    .top-bar-actions {
        display: none;
    }
    
    .top-bar-content {
        justify-content: space-between;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .number-control {
        max-width: 100px;
        width: 100px;
        height: 36px;
        gap: 6px;
    }
    
    .number-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .number-control .device-number {
        width: 36px;
        min-width: 36px;
        max-width: 36px;
        height: 28px;
        font-size: 14px;
        line-height: 26px;
    }
    

}

.form-section {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
}

.form-section-title {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.form-section-title i {
    font-size: 20px;
    color: var(--primary-color);
}

.form-section-content {
    padding: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.form-control {
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
    background: white;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(49, 63, 247, 0.1);
}

.form-control:hover:not(:focus) {
    border-color: white;
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    gap: 15px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Centrar las últimas dos tarjetas si hay 6 elementos */
.devices-grid .device-category:nth-child(5) {
    grid-column-start: 2;
}

.devices-grid .device-category:nth-child(6) {
    grid-column-start: 3;
}

/* Responsive para dispositivos más pequeños */
@media (max-width: 1200px) {
    .devices-grid {
        grid-template-columns: repeat(3, minmax(250px, 1fr));
    }
    
    .devices-grid .device-category:nth-child(5) {
        grid-column-start: auto;
    }
    
    .devices-grid .device-category:nth-child(6) {
        grid-column-start: auto;
    }
}

@media (max-width: 900px) {
    .devices-grid {
        grid-template-columns: repeat(2, minmax(250px, 1fr));
    }
}

.device-category {
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    transition: var(--transition);
    text-align: center;
    width: 100%;
    max-width: 280px;
}

.device-category:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.device-category h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.device-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.device-input label {
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
    margin: 0;
    font-size: 14px;
}

.device-number {
    width: 100% !important;
    max-width: 120px !important;
    margin: 0 auto !important;
    padding: 12px !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    background: white !important;
    transition: all 0.3s ease !important;
    font-family: inherit !important;
}

.device-number:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(49, 62, 246, 0.15) !important;
    transform: scale(1.05) !important;
}

.device-input small {
    text-align: center;
    margin-top: 8px;
    display: block;
    color: var(--text-light);
    font-size: 12px;
}

.device-inputs {
    display: grid;
    gap: 16px;
}

.device-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: white;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid var(--border-color);
}

.counter-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 12px;
}

.counter-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.counter-input {
    width: 60px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    background: white;
    margin: 4px 0;
}

.counter-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.usage-category {
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    transition: var(--transition);
}

.usage-category:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

.usage-category h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.usage-category h4 i {
    color: var(--primary-color);
}

.device-usage-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    background: #fafafa;
}

.device-section-header h3 {
    color: var(--primary-color);
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.device-section-header h3 i {
    font-size: 1.2em;
}

.device-section-header p {
    color: var(--text-light);
    font-size: 0.95em;
    margin-bottom: 15px;
}

.no-devices-message {
    text-align: center;
    padding: 40px 20px;
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: var(--border-radius);
    color: #8a6914;
}

.no-devices-message i {
    font-size: 3em;
    margin-bottom: 15px;
    color: #ff9800;
}

.no-devices-message h3 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

.no-devices-message p {
    font-size: 1em;
    opacity: 0.8;
}

.usage-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.usage-option:hover {
    background: rgba(49, 62, 246, 0.05);
}

.usage-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.usage-option label {
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
    margin: 0;
    flex: 1;
}

.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background: white;
    border-top: 1px solid var(--border-color);
    gap: 12px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.external-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    gap: 15px;
    flex-wrap: wrap;
}

.internal-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.phase4-buttons-spaced {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2832e5;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: var(--text-light);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #4b5563;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--primary-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #8fb012;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.results-container {
    padding: 16px;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-recommendation {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.recommendation-header {
    text-align: center;
    margin-bottom: 16px;
}

.recommendation-header i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: block;
}

.recommendation-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.recommendation-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.recommendation-content {
    display: flex;
    justify-content: center;
}

.plan-card {
    position: relative;
    background: #fafbfc;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 25px;
    min-width: 300px;
    text-align: center;
}

.plan-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--secondary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.plan-info {
    margin-top: 10px;
}

.plan-speed {
    margin-bottom: 15px;
}

.plan-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
    text-align: center;
}

.plan-speeds {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-align: center;
}

.speed-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.speed-comparison:first-child {
    background: #f9fff3;
    border: 1px solid #e7feca;
}

.speed-comparison:last-child {
    background: #e3f2fd;
    border: 2px solid var(--primary-color);
    padding: 16px 20px;
    margin-bottom: 8px;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(49, 62, 246, 0.15);
}

.speed-label {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 140px;
    font-size: 0.9rem;
}

.speed-comparison:last-child .speed-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
}

.speed-required {
    color: #64dc35;
    font-weight: 600;
    font-size: 0.95rem;
}

.speed-plan {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(49, 62, 246, 0.1);
}

.plan-price {
    text-align: center;
    margin-top: 15px;
}

.price-breakdown .total-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.price-breakdown .price-details {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

.tv-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.section-header {
    text-align: center;
    margin-bottom: 20px;
}

.section-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 8px;
}

.section-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
    display: inline-flex;
    align-items: center;
}

.section-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.tv-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    max-width: 100%;
    overflow: hidden;
}

.loading-tv-plans {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.results h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.recommendation-card {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-heavy);
    text-align: center;
    max-width: 600px;
}

.recommendation-title {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.recommendation-title i {
    font-size: 28px;
    color: var(--secondary-color);
}

.speed-display {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 16px 0;
    letter-spacing: -2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.plan-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.plan-detail {
    text-align: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.plan-detail-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

.plan-detail-label {
    font-size: 14px;
    color: var(--text-light);
}

.alternative-plans {
    margin-top: 32px;
    text-align: left;
}

.alternative-plans h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.alternative-plan {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.alternative-plan:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.alternative-plan-speed {
    font-weight: 600;
    color: var(--primary-color);
}

.alternative-plan-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
}

.loading {
    text-align: center;
    padding: 48px;
}

.loading-spinner {
    border: 4px solid white;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-light);
    font-size: 16px;
    font-weight: 500;
}

.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid;
    font-size: 14px;
}

.alert-success {
    background-color: white;
    border-color: var(--secondary-color);
    color: #15803d;
}

.alert-error {
    background-color: white;
    border-color: #ef4444;
    color: #dc2626;
}

.alert-warning {
    background-color: white;
    border-color: #f59e0b;
    color: #d97706;
}

.alert-info {
    background-color: white;
    border-color: var(--primary-color);
    color: #2563eb;
}

.action-buttons {
    display: flex;
    gap: 24px;
    margin-top: 40px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 20px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    min-width: 180px;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
    border: 2px solid var(--secondary-color);
}

.btn-success:hover {
    background: #92b516;
    border-color: #92b516;
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.btn-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        margin: 75px 5px 15px;
        border-radius: 8px;
    }

    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .progress-indicator {
        padding: 15px 12px;
        flex-direction: column;
        gap: 10px;
    }

    .progress-line {
        width: 2px;
        height: 15px;
    }

    .form-step {
        padding: 12px;
    }

    .form-section-content {
        padding: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .devices-grid,
    .usage-grid {
        grid-template-columns: 1fr;
    }

    .buttons {
        flex-direction: column;
        gap: 12px;
        padding: 20px 16px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .plan-details {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
        gap: 16px;
        padding: 0 16px;
    }
    
    .external-buttons {
        flex-direction: column;
        gap: 16px;
        padding: 20px 16px;
    }
    
    .internal-buttons {
        flex-direction: column;
        gap: 16px;
        padding: 20px 16px;
    }
    
    .phase4-buttons-spaced {
        flex-direction: column;
        gap: 16px;
        padding: 0 16px;
    }
    
    .tv-plans-horizontal {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .total-price-button {
        font-size: 16px;
        padding: 12px 20px;
    }
    
    .recommendation-card {
        padding: 24px 16px;
        margin: 0 16px 20px;
    }
    
    .speed-display {
        font-size: 2.5rem;
    }

    .btn-large {
        min-width: auto;
    }

    .top-bar-content {
        padding: 0 16px;
    }

    .main-navigation {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 80px 4px 16px;
    }

    .header {
        padding: 24px 16px;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .form-section-content {
        padding: 12px;
    }

    .device-category {
        padding: 16px;
    }

    .usage-category {
        padding: 16px;
    }

    .recommendation-card {
        padding: 24px;
    }

    .speed-display {
        font-size: 2.5rem;
    }
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 14px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    font-family: inherit;
    background: white;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(49, 62, 246, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.card-hover {
    transition: var(--transition);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
}

.tv-plans-section {
    margin-top: 32px;
    margin-bottom: 24px;
}

.tv-plans-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tv-plans-section h3 i {
    color: var(--primary-color);
}

.tv-plans-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.tv-plan-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-align: center;
    min-height: 120px;
    width: 100%;
    box-sizing: border-box;
}

.tv-plan-button:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.tv-plan-button.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.tv-plan-button.selected:hover {
    background: #2832e5;
    border-color: #2832e5;
}

.tv-plan-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.tv-plan-price {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    display: block;
}

.total-price-section {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.total-price-button {
    background: transparent;
    color: var(--text-dark);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    font-size: 18px;
    font-weight: 400;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid white;
    transition: var(--transition);
}

.total-price-button:hover {
    border-color: var(--primary-color);
    background: rgba(49, 62, 246, 0.05);
}

.total-price-button i {
    font-size: 16px;
    color: var(--secondary-color);
}

.total-price-button #total-price {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 20px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-weight-bold { font-weight: 600; }
.text-muted { color: var(--text-light); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

@media print {
    .top-bar,
    .buttons,
    .action-buttons {
        display: none;
    }
    
    .container {
        box-shadow: none;
        margin: 0;
        width: 100%;
    }
    
    body {
        background: white;
    }
}

.loading-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
    background: white;
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
    min-height: 120px;
}

.loading-message i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 16px;
    animation: spin 2s linear infinite;
}

.loading-message p {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.loading-message small {
    font-size: 12px;
    color: var(--text-light);
    opacity: 0.8;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.construction-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.construction-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.construction-option:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.construction-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
    margin-top: 2px;
}

.construction-option input[type="checkbox"]:checked + label {
    color: var(--primary-color);
}

.construction-option label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.construction-option label i {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.construction-option label strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.construction-option label span {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-left: 4px solid;
    animation: slideInRight 0.3s ease-out;
}

.toast-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.toast-error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.toast-info {
    border-left-color: var(--primary-color);
    background: #eff6ff;
}

.toast-success {
    border-left-color: var(--secondary-color);
    background: #f0fdf4;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.toast-content i {
    font-size: 16px;
}

.toast-warning .toast-content i {
    color: #f59e0b;
}

.toast-error .toast-content i {
    color: #ef4444;
}

.toast-info .toast-content i {
    color: var(--primary-color);
}

.toast-success .toast-content i {
    color: var(--secondary-color);
}

.toast-content span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    margin-left: 10px;
}

.toast-close:hover {
    color: var(--text-dark);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

#dynamic-usage-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding: 0;
}

.dynamic-usage-category {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.dynamic-usage-category:hover {
    border-color: #2832e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.dynamic-usage-category h4 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    text-align: left;
}

.dynamic-usage-category h4 i {
    color: #2832e5;
    font-size: 1.2em;
}

.dynamic-usage-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.usage-button {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    text-align: left;
    min-height: 32px;
    width: 100%;
    font-family: inherit;
    line-height: 1.2;
}

.usage-button:hover {
    border-color: #2832e5;
    background: #f8f9fa;
    transform: translateY(-1px);
}

.usage-button.selected {
    background: #2832e5;
    color: white;
    border-color: #2832e5;
}

.usage-button.selected:hover {
    background: #286ae5;
}

.usage-button i {
    font-size: 0.9em;
    min-width: 14px;
}

@media (max-width: 768px) {
    .dynamic-usage-category {
        padding: 12px;
    }
    
    #dynamic-usage-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .usage-button {
        padding: 5px 8px;
        font-size: 0.75em;
        min-height: 28px;
    }
}

@media (max-width: 480px) {
    .dynamic-usage-options {
        gap: 3px;
    }
    
    .dynamic-usage-category {
        padding: 10px;
    }
    
    #dynamic-usage-categories {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 10px;
    }
    
    .usage-button {
        padding: 4px 8px;
        font-size: 0.7em;
        min-height: 26px;
    }
}

.construction-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.construction-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 90px;
}

.construction-btn:hover {
    border-color: #2832e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.construction-btn.selected {
    background: #2832e5;
    color: white;
    border-color: #2832e5;
}

.construction-btn.selected:hover {
    background: #286ae5;
}

.construction-btn i {
    font-size: 1.5em;
    margin-bottom: 3px;
    color: #2832e5;
}

.construction-btn.selected i {
    color: white;
}

.construction-btn strong {
    font-size: 1em;
    font-weight: 600;
}

.construction-btn span {
    font-size: 0.8em;
    color: #6b7280;
    line-height: 1.2;
}

.construction-btn.selected span {
    color: rgba(255, 255, 255, 0.9);
}


@media (max-width: 768px) {
    .construction-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .construction-btn {
        padding: 15px 10px;
        min-height: 100px;
    }
    
    .construction-btn i {
        font-size: 1.5em;
    }

.tv-accordion {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 16px;
}

.tv-accordion-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    list-style: none;
    margin: 0;
    min-height: 60px;
}

.tv-accordion-header::-webkit-details-marker {
    display: none;
}

.tv-accordion-header i.fas:first-child {
    margin-right: 12px;
    color: var(--primary-color);
}

.tv-summary-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0; 
}

.tv-selected-summary {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; 
}

.accordion-arrow {
    transition: transform 0.3s ease;
    margin-left: auto;
}

.tv-accordion[open] .accordion-arrow {
    transform: rotate(180deg);
}

.tv-accordion-content {
    padding: 16px;
    background: white;
    overflow: hidden;
}

.tv-plan-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-plan-channels {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.tv-plan-price {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 13px;
}

.tv-description {
    margin-bottom: 16px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.cta-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cta {
    width: 100%;
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.btn-cta:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.cta-note {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0;
    }
}