/* Reset e Base */
.ingles-fluente-frontend * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ingles-fluente-frontend {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Header */
.if-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.if-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.if-header-main {
    flex: 1;
}

.if-title {
    font-size: 2.5em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.if-subtitle {
    font-size: 1.1em;
    color: #666;
    font-weight: 500;
}

.if-user-progress {
    min-width: 300px;
}

.if-progress-info {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.if-progress-bar {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.if-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.if-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.if-progress-percent {
    font-weight: 700;
    color: #28a745;
    font-size: 1.2em;
}

.if-progress-detail {
    color: #666;
    font-size: 0.9em;
}

/* Filtros */
.if-filters-section {
    margin-bottom: 30px;
}

.if-filters-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.if-filters-header {
    text-align: center;
    margin-bottom: 30px;
}

.if-filters-icon {
    font-size: 3em;
    margin-bottom: 16px;
}

.if-filters-header h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 8px;
}

.if-filters-header p {
    color: #666;
    font-size: 1.1em;
}

.if-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: end;
}

.if-filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.if-filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1em;
}

.if-filter-icon {
    font-size: 1.2em;
}

.if-filter-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    font-size: 1em;
    background: white;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.if-filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.if-filter-actions {
    display: flex;
    align-items: end;
    height: 100%;
}

/* Botões */
.if-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.if-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.if-btn:hover:before {
    left: 100%;
}

.if-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.if-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.if-btn-lg {
    padding: 18px 32px;
    font-size: 1.1em;
}

.if-btn-xl {
    padding: 20px 40px;
    font-size: 1.2em;
    min-width: 180px;
}

.if-btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.if-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

.if-btn-danger {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.if-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6);
}

.if-btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.if-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6);
}

.if-btn-audio {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.if-btn-audio:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.6);
}

.if-btn-icon {
    font-size: 1.2em;
}

/* Área de Prática */
.if-practice-section {
    margin-bottom: 30px;
}

.if-practice-container {
    max-width: 800px;
    margin: 0 auto;
}

.if-practice-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Progresso do Nível */
.if-level-progress-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
}

.if-level-progress-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
}

.if-component-progress-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #e9ecef;
    position: relative;
    transition: all 0.3s ease;
}

.if-component-progress-item.completed {
    border-color: #28a745;
    background: #f8fff9;
}

.if-component-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.if-component-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.if-component-stats {
    font-weight: 600;
    color: #666;
    font-size: 0.9em;
}

.if-component-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.if-component-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.if-component-progress-item.completed .if-component-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.if-component-check {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.2em;
}

/* Informações da Prática */
.if-practice-info {
    margin: 20px 0;
}

.if-info-card {
    background: #e7f3ff;
    border: 2px solid #b3d9ff;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.if-info-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.if-info-content h4 {
    margin: 0 0 8px 0;
    color: #0066cc;
    font-size: 1em;
}

.if-info-content p {
    margin: 4px 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Display da Frase */
.if-phrase-display {
    margin-bottom: 40px;
}

.if-phrase-content {
    margin-bottom: 30px;
}

.if-english-section,
.if-portuguese-section {
    margin-bottom: 30px;
}

.if-section-label {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.if-english-phrase {
    font-size: 2.2em;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin: 0;
}

.if-portuguese-translation {
    font-size: 1.6em;
    color: #666;
    line-height: 1.4;
    margin: 0;
    font-style: italic;
}

.if-phrase-actions {
    margin-bottom: 20px;
}

.if-phrase-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.if-level-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.if-component-tag {
    background: #e9ecef;
    color: #666;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Estilo para quando está preso no componente */
.if-locked-component {
    background: #ff6b6b !important;
    color: white !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.if-same-component {
    border-left: 4px solid #ff6b6b;
}

/* Response Section */
.if-response-section {
    text-align: center;
}

.if-response-header {
    margin-bottom: 30px;
}

.if-response-header h3 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 8px;
}

.if-response-header p {
    color: #666;
    font-size: 1.1em;
}

.if-response-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Botões de Navegação */
.if-navigation-buttons {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    padding: 30px;
    margin-top: 20px;
    text-align: center;
    color: white;
}

.if-navigation-content h3 {
    margin: 0 0 10px 0;
    color: white;
    font-size: 1.4em;
}

.if-navigation-content p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.if-navigation-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Mensagens */
.if-unlock-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.if-unlock-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.if-unlock-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.if-unlock-card h3 {
    margin-bottom: 16px;
    color: #333;
}

.if-unlock-card p {
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Login Required */
.if-login-required {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.if-login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.if-login-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.if-login-card h3 {
    margin-bottom: 12px;
    color: #333;
}

.if-login-card p {
    color: #666;
    margin-bottom: 24px;
}

/* Notificações */
.if-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    max-width: 400px;
}

.if-notification.success {
    background: linear-gradient(135deg, #34c759, #30b451);
}

.if-notification.error {
    background: linear-gradient(135deg, #ff3b30, #ff2a1e);
}

.if-notification.info {
    background: linear-gradient(135deg, #00a4bd, #008da3);
}

/* Responsividade */
@media (max-width: 768px) {
    .ingles-fluente-frontend {
        padding: 15px;
    }
    
    .if-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .if-title {
        font-size: 2em;
        justify-content: center;
    }
    
    .if-user-progress {
        min-width: auto;
        width: 100%;
    }
    
    .if-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .if-response-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .if-btn-xl {
        width: 100%;
        max-width: 300px;
    }
    
    .if-english-phrase {
        font-size: 1.8em;
    }
    
    .if-portuguese-translation {
        font-size: 1.4em;
    }
    
    .if-practice-card {
        padding: 25px;
    }
    
    .if-navigation-actions {
        flex-direction: column;
    }
    
    .if-navigation-actions .if-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .if-header {
        padding: 20px;
    }
    
    .if-filters-card {
        padding: 20px;
    }
    
    .if-title {
        font-size: 1.8em;
    }
    
    .if-english-phrase {
        font-size: 1.5em;
    }
    
    .if-portuguese-translation {
        font-size: 1.2em;
    }
}